new ChromecastReceiver()
Members
(static, constant) ChromecastEventType :string
ChromecastReceiver event types.
Properties:
Name | Value | Type | Description |
---|---|---|---|
LICENSE_ERROR |
licenseError | string | The event has the detail field with a description error. |
Methods
addEventListener(type, listener)
Add an event listener to this object.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The event type to listen for. |
listener |
EventListener | function | The callback or listener object to invoke. |
(async) destroy()
Destroys the Chromecast receiver player.
getMediaElement() → {HTMLMediaElement}
Returns the media element.
getPlayerContainerDiv() → {Element}
Returns the div Element where the player is displayed.
init(config)
Initializes the Chromecast receiver player
Parameters:
Name | Type | Description |
---|---|---|
config |
ChromecastReceiverConfig |
listenToAllEvents(listener)
Add an event listener to this object that is invoked for all events types the object fires.
Parameters:
Name | Type | Description |
---|---|---|
listener |
EventListener | function | The callback or listener object to invoke. |
removeEventListener(type, listener)
Remove an event listener from this object.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The event type for which you wish to remove a listener. |
listener |
EventListener | function | The callback or listener object to remove. |