Google Cast and WebSocket remote control configuration
CAFContentProtectionSystem
Type
CAFContentProtectionSystem =
"clearkey"|"playready"|"widevine"
CAFDrmConfig
Interface
Properties
headers?
optionalheaders?:HttpHeaders
Headers for the license request
licenseUrl
licenseUrl:
string
The license server URL
protectionSystem
protectionSystem:
CAFContentProtectionSystem
The content protection system
withCredentials?
optionalwithCredentials?:boolean
If cookies/credentials should be sent along with the license request
CAFMediaInfoCustomData
Interface
The customData object on the MediaInfo that a LoadRequest is made with. It contains data that is relevant to the
respective source being loaded.
MediaInfo.customData
Properties
drm?
optionaldrm?:CAFDrmConfig
The DRM config needed to play the source
metadata?
optionalmetadata?:CAFMetadata
Custom metadata
options?
optionaloptions?:CAFSourceOptions
Options that should apply for the source
CAFMetadata
Interface
Indexable
[
key:string]:string
CAFSourceOptions
Type
CAFSourceOptions =
Pick<SourceConfigOptions,"withCredentials"|"manifestWithCredentials">
Options that should apply for the loaded source. This is a subset of SourceConfigOptions (i.e the same semantics
apply) as there is limited support on CAF.
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',
},
}Extends
Properties
customReceiverConfig?
optionalcustomReceiverConfig?: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?
optionalmessageNamespace?: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?
optionalreceiverApplicationId?: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?
optionalreceiverVersion?:"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?
optionalrejoinActiveSession?: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()?
optionalprepareMediaInfo(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
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.
Extended by
Properties
customReceiverConfig?
optionalcustomReceiverConfig?: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',
},
}Extends
Properties
customReceiverConfig?
optionalcustomReceiverConfig?: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?
optionalapplication_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?
optionalenable?:boolean
ChromeCast support is disabled (false) per default. To enable it, set this attribute to true.
message_namespace?
optionalmessage_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?
optionalreceiverStylesheetUrl?: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
Arbitrary configuration values that are sent to the remote control receiver.
Properties
receiverStylesheetUrl?
optionalreceiverStylesheetUrl?:string
A URL to a stylesheet that customizes the receiver UI style.