# Interface ICefMediaRouter

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFInterfaces

## Declaration

`type ICefMediaRouter = interface(ICefBaseRefCounted)`

## Description

Supports discovery of and communication with media devices on the local network via the Cast and DIAL protocols. The functions of this interface may be called on any browser process thread unless otherwise indicated.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_media_router_capi.h">CEF source file: /include/capi/cef_media_router_capi.h (cef_media_router_t))

## Hierarchy

- IInterface
- ICefBaseRefCounted
- ICefMediaRouter

## Overview

### Methods

| `function AddObserver(const observer: ICefMediaObserver): ICefRegistration;`
| `function GetSource(const urn: ustring): ICefMediaSource;`
| `procedure NotifyCurrentSinks;`
| `procedure CreateRoute(const source: ICefMediaSource; const sink: ICefMediaSink; const callback: ICefMediaRouteCreateCallback);`
| `procedure NotifyCurrentRoutes;`

## Description

### Methods

| `function AddObserver(const observer: ICefMediaObserver): ICefRegistration;`
Add an observer for MediaRouter events. The observer will remain registered until the returned Registration object is destroyed. ###### Attributes GUID['{F18C3880-CB8D-48F9-9D74-DCFF4B9E88DF}']

| `function GetSource(const urn: ustring): ICefMediaSource;`
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>").

| `procedure NotifyCurrentSinks;`
Trigger an asynchronous call to ICefMediaObserver.OnSinks on all registered observers.

| `procedure CreateRoute(const source: ICefMediaSource; const sink: ICefMediaSink; const callback: ICefMediaRouteCreateCallback);`
Create a new route between |source| and |sink|. Source and sink must be valid, compatible (as reported by ICefMediaSink.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 ICefMediaObserver.OnRoutes on all registered observers.

| `procedure NotifyCurrentRoutes;`
Trigger an asynchronous call to ICefMediaObserver.OnRoutes on all registered observers.

Generated by PasDoc 0.16.0-snapshot.