Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
CefMediaRouter Class Referenceabstract

Supports discovery of and communication with media devices on the local network via the Cast and DIAL protocols. More...

#include "include/cef_media_router.h"

Inheritance diagram for CefMediaRouter:
CefBaseRefCounted

Public Member Functions

virtual CefRefPtr< CefRegistrationAddObserver (CefRefPtr< CefMediaObserver > observer)=0
 Add an observer for MediaRouter events. More...
 
virtual CefRefPtr< CefMediaSourceGetSource (const CefString &urn)=0
 Returns a MediaSource object for the specified media source URN. More...
 
virtual void NotifyCurrentSinks ()=0
 Trigger an asynchronous call to CefMediaObserver::OnSinks on all registered observers. More...
 
virtual void CreateRoute (CefRefPtr< CefMediaSource > source, CefRefPtr< CefMediaSink > sink, CefRefPtr< CefMediaRouteCreateCallback > callback)=0
 Create a new route between |source| and |sink|. More...
 
virtual void NotifyCurrentRoutes ()=0
 Trigger an asynchronous call to CefMediaObserver::OnRoutes on all registered observers. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefMediaRouterGetGlobalMediaRouter (CefRefPtr< CefCompletionCallback > callback)
 Returns the MediaRouter object associated with the global request context. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Supports discovery of and communication with media devices on the local network via the Cast and DIAL protocols.

The methods of this class may be called on any browser process thread unless otherwise indicated.

Member Function Documentation

◆ AddObserver()

virtual CefRefPtr<CefRegistration> CefMediaRouter::AddObserver ( CefRefPtr< CefMediaObserver observer)
pure virtual

Add an observer for MediaRouter events.

The observer will remain registered until the returned Registration object is destroyed.

◆ CreateRoute()

virtual void CefMediaRouter::CreateRoute ( CefRefPtr< CefMediaSource source,
CefRefPtr< CefMediaSink sink,
CefRefPtr< CefMediaRouteCreateCallback callback 
)
pure virtual

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.

◆ GetGlobalMediaRouter()

static CefRefPtr<CefMediaRouter> CefMediaRouter::GetGlobalMediaRouter ( CefRefPtr< CefCompletionCallback callback)
static

Returns the MediaRouter object associated with the global request context.

If |callback| is non-NULL it will be executed asnychronously on the UI thread after the manager's storage has been initialized. Equivalent to calling CefRequestContext::GetGlobalContext()->GetMediaRouter().

◆ GetSource()

virtual CefRefPtr<CefMediaSource> CefMediaRouter::GetSource ( const CefString urn)
pure virtual

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:<appId>?clientId=<clientId>").

◆ NotifyCurrentRoutes()

virtual void CefMediaRouter::NotifyCurrentRoutes ( )
pure virtual

Trigger an asynchronous call to CefMediaObserver::OnRoutes on all registered observers.

◆ NotifyCurrentSinks()

virtual void CefMediaRouter::NotifyCurrentSinks ( )
pure virtual

Trigger an asynchronous call to CefMediaObserver::OnSinks on all registered observers.


The documentation for this class was generated from the following file: