This API call allows a developer to listen for cast
events.
.on('cast')
Triggered when a cast
property changes.
{
"available": true,
"active": true,
"deviceName": "ViewerTV",
"type": "cast"
}
Value | Description |
---|---|
active boolean | Indicates that casting has started (true ) or has stopped (false ) |
available boolean | Indicates a device is (true ) or is not (false ) available for castingWhen a device is available to be cast to, the cast icon appears in the player control bar. |
deviceName string | Name that the viewer assigns to device (receiver) This property is only populated when "cast.active": "true" . |
type string | Category of player event This is always cast for this event. |
.on('castIntercepted')
Fired when interceptCast is enabled, and a customer tries to cast content.
This event also indicates whether a cast session is currently active.
{
"isCasting": false,
"type": "castIntercepted"
}
Value | Description |
---|---|
isCastingΒ boolean | Indicates whether the Chromecast device is (true ) or is not (false ) casting media |
type string | Identifies the event being listened for (castIntercepted ). |