Ejemplo n.º 1
0
 /// <summary>
 /// Create a new route between |source| and |sink|. Source and sink must be
 /// valid, compatible (as reported by CefMediaSink::IsCompatibleWith), and a
 /// route between them must not already exist. |callback| will be executed
 /// on success or failure. If route creation succeeds it will also trigger an
 /// asynchronous call to CefMediaObserver::OnRoutes on all registered
 /// observers.
 /// </summary>
 public void CreateRoute(CefMediaSource source, CefMediaSink sink, CefMediaRouteCreateCallback callback)
 {
     cef_media_router_t.create_route(_self,
                                     source.ToNative(),
                                     sink.ToNative(),
                                     callback.ToNative());
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a MediaSource object for the specified media source URN. Supported
        /// URN schemes include "cast:" and "dial:", and will be already known by the
        /// client application (e.g. "cast:&lt;appId&gt;?clientId=&lt;clientId&gt;").
        /// </summary>
        public CefMediaSource GetSource(string urn)
        {
            fixed(char *urn_str = urn)
            {
                var n_urn    = new cef_string_t(urn_str, urn.Length);
                var n_result = cef_media_router_t.get_source(_self, &n_urn);

                return(CefMediaSource.FromNativeOrNull(n_result));
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns the source associated with this route.
 /// </summary>
 public CefMediaSource GetSource()
 {
     return(CefMediaSource.FromNative(
                cef_media_route_t.get_source(_self)
                ));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Returns true if this sink is compatible with |source|.
 /// </summary>
 public bool IsCompatibleWith(CefMediaSource source)
 {
     return(cef_media_sink_t.is_compatible_with(_self, source.ToNative()) != 0);
 }