Cast Events

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"
}
ValueDescription
active booleanIndicates that casting has started (true) or has stopped (false)
available boolean

Indicates a device is (true) or is not (false) available for casting

When 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"
}
ValueDescription
isCasting booleanIndicates whether the Chromecast device is (true) or is not (false) casting media
type stringIdentifies the event being listened for (castIntercepted).
© 2007- Longtail Ad Solutions, Inc.