Chromecast module#
The Chromecast module allows seamless casting of media directly to Chromecast devices, simplifying the process of establishing and managing casting sessions.
Features#
- Automatic Session Management
- Automatically closes inactive sessions after a timeout (e.g., when the video is paused or ends, and the user does not interact).
- Automatically disposes of sessions when the player is destroyed (except during a page refresh).
- Customizable UI Integration
- Provides a Cast button that can be added to the control bar.
- Allows positioning of the Cast button within the control bar.
Limitations#
The module is incompatible with the Podcast module, Panorama module, or the Hotspots Editor module. Any of these configurations will prevent the module from functioning as intended. Additionally, the module requires an HTTPS protocol to operate correctly. The module will be enabled only when the site uses the HTTPS protocol.
Options#
Option | Type | Description |
---|---|---|
receiverAppID | string | The receiver application ID for the Chromecast. If not specified, the default app ID will be used. |
addButtonToControlBar | boolean | Indicates whether a Cast button should be added to the control bar. |
buttonPositionIndex | number | Specifies the position index where the Cast button should be placed within the control bar. Example: buttonPositionIndex: 16 |
Note: This property is ignored if addButtonToControlBar is set to false.
Example#
window.initPlayer('my-video', { chromecastPlugin: { receiverAppID: '12345ABC', addButtonToControlBar: true, buttonPositionIndex: 16, }, })