Google Cast and WebSocket remote control configuration
GoogleCastReceiverVersion
Enum
Enumeration Members
v2
• v2 = "v2"
v3
• v3 = "v3"
GoogleCastRemoteControlConfig
Interface
Configuration interface for remote control of Google Cast (e.g. Chromecast) receivers.
Example (enable casting with Bitmovin receiver app and custom style):
{
type: 'googlecast',
customReceiverConfig: {
receiverStylesheetUrl: 'https://mycdn.com/mycustomreceiverstyle.css',
},
}Example (custom receiver):
{
type: 'googlecast',
receiverApplicationId: '1234ABCD',
customReceiverConfig: {
customPropertyName: 'customValue',
},
}Hierarchy
-
↳
GoogleCastRemoteControlConfig
Properties
customReceiverConfig
• Optional customReceiverConfig: RemoteControlCustomReceiverConfig
An arbitrary configuration object that is sent to the receiver when a connection is established. This object
can carry configuration values that are of no concern to and are handled outside of the RemoteControl/
RemoteControlReceiver architecture.
Inherited from
RemoteControlConfig.customReceiverConfig
messageNamespace
• Optional messageNamespace: string
The message namespace for communication of advanced player functionality not covered by the Cast media controls.
Only overwrite this if you are implementing your own custom receiver.
receiverApplicationId
• Optional receiverApplicationId: string
The application ID of the Cast application that should be launched when connecting to a Cast receiver.
Set this if you want to use your own custom receiver application. If unset, the Bitmovin player cast application
is used.
receiverVersion
• Optional receiverVersion: "v2" | "v3"
The receiver app version. This is only necessary if providing custom receiverApplicationId and
it is using receiver app v3.
Default is 'v2'
Since: 8.43.0
rejoinActiveSession
• Optional rejoinActiveSession: boolean
Specifies, whether an existing Cast session shall be re-joined rather than creating a new one when casting starts.
Default is false.
Since: 8.67.0
type
• type: "googlecast"
Methods
prepareMediaInfo
▸ prepareMediaInfo(mediaInfo): Promise<any>
Callback providing the possibility to prepare/alter the media info object before it is loaded onto Chromecast
receiver app to change its media/source.
Example:
prepareMediaInfo: function(mediaInfo) {
// Signal fMP4 container format for audio and video
mediaInfo.hlsSegmentFormat = chrome.cast.media.HlsSegmentFormat.FMP4;
mediaInfo.hlsVideoSegmentFormat = chrome.cast.media.HlsVideoSegmentFormat.FMP4;
return Promise.resolve(mediaInfo);
}Note: This callback is only supported with Chromecast v3 (CAF) receivers.
Parameters
| Name | Type | Description |
|---|---|---|
mediaInfo | any | The object representing the media to be loaded on the receiver, see chrome.cast.media.MediaInfo |
Returns
Promise<any>
A promise resloving with the altered object that the player will load on the receiver.
Since: 8.78.0
RemoteControlConfig
Interface
Configuration interface for a RemoteControl.
Hierarchy
-
RemoteControlConfig
Properties
customReceiverConfig
• Optional customReceiverConfig: RemoteControlCustomReceiverConfig
An arbitrary configuration object that is sent to the receiver when a connection is established. This object
can carry configuration values that are of no concern to and are handled outside of the RemoteControl/
RemoteControlReceiver architecture.
WebSocketRemoteControlConfig
Interface
Configuration interface for WebSocket-based player remote control.
Requires a running WebSocket server available at
https://github.com/bitmovin/bitmovin-player-remote-websocketserver.
Example:
{
type: 'websocket',
url: 'ws://your-server-ip:29100',
customReceiverConfig: {
receiverStylesheetUrl: 'https://mycdn.com/mycustomreceiverstyle.css',
},
}Hierarchy
-
↳
WebSocketRemoteControlConfig
Properties
customReceiverConfig
• Optional customReceiverConfig: RemoteControlCustomReceiverConfig
An arbitrary configuration object that is sent to the receiver when a connection is established. This object
can carry configuration values that are of no concern to and are handled outside of the RemoteControl/
RemoteControlReceiver architecture.
Inherited from
RemoteControlConfig.customReceiverConfig
type
• type: "websocket"
url
• url: string
The URL of the WebSocket server managing communication between WebSocket remote controls
and WebSocket remote receivers.
CastConfig
Interface
Example:
cast : {
enable : true,
application_id : 'A12B45C6'
}Properties
application_id
• Optional application_id: string
The ChromeCast application ID retrieved from Google when a Cast receiver app is registered. To use
ChromeCast with player version 6 an higher, it is not necessary to use this option. For versions
pre v6, please use ‘121122A0’, or your dedicated ID, in case you want to use a custom ChromeCast
receiver app.
Starting with player 6, the application ID needs only be set if you want to use your own custom receiver app.
By default, Bitmovin's Cast receiver app is used.
enable
• Optional enable: boolean
ChromeCast support is disabled (false) per default. To enable it, set this attribute to true.
message_namespace
• Optional message_namespace: string
A custom message namespace as defined in the Cast receiver app. To use ChromeCast, it is not necessary
to use this option! This is only needed if one wants to create a custom ChromeCast receiver app.
receiverStylesheetUrl
• Optional receiverStylesheetUrl: string
A URL to a CSS file the Chromecast receiver app loads. Can be used to style the receiver app.
Since: 7.1
RemoteControlCustomReceiverConfig
Interface
Indexable
▪ [key: string]: string | undefined
Arbitrary configuration values that are sent to the remote control receiver.
Properties
receiverStylesheetUrl
• Optional receiverStylesheetUrl: string
A URL to a stylesheet that customizes the receiver UI style.