Configuration
The Roku platform has two-level configurations:
- DIVA BO Adapter: It's the configuration of the Roku package responsible for the videodata request.
- DIVA Player: It's the configuration of the Roku package responsible for video playback.
Before starting​
- Refer to the Video player instantiation input article to understand the role of the configuration in the video player instantiation.
- Refer to the Basic instantiation code article to understand what part of code you can extend with the configuration options full list.
Configuration​
When instantiating DIVA Player, you must configure two variables:
m.dpUtilsNode
: Set it with a DivaPlayerSDK:DPUtilsNode instance, which is responsible for rendering the DIVA Player UI.m.boAdapterNode
: Set it with a DivaBOAdapter:DivaBOAdapter instance, which is responsible for connectingm.dpUtilsNode
(the DIVA Player UI) to the Deltatre video CMS (DIVA Back Office)
Configuration options for DIVA BO Adapter full list​
Mandatory properties for DIVA BO Adapter​
Property | Description | Type | Default value |
---|---|---|---|
videoId | The video Id | string | - |
settingId | The URL of the settings file | string | - |
dictionaryId | Language code | string | - |
Other Optional properties for DIVA BO Adapter​
Property | Type | Default | Description | Impacted features |
---|---|---|---|---|
entitlementToken | string | "" | Used within the Entitlement check request, the entitlementToken contains the <userID> . See Entitlement and DRM for further information on entitlement. |
Configuration options for DIVA Player full list​
The divaLaunchParams
observer allows modifying the DIVA Player configuration.
Example of the code for adding/modifying the initialization data and field deepLinkType
for DIVA Player:
sub launchBOAdapter(divaLaunchParams as object)
...
m.boAdapterNode = CreateObject("roSGNode", "DivaBOAdapter:DivaBOAdapter")
...
m.boAdapterNode.observeField("divaLaunchParams", "onBOAdapterDivaLaunchParamsHandler")
...
end sub
sub onBOAdapterDivaLaunchParamsHandler(evt as dynamic)
data = evt.getData()
'Adding/modifying the initialization data DIVA Player
data.deepLinkType = "relative"
' Setup Diva Player launch parameters
m.dpUtilsNode.callFunc("setLaunchParams", data)
end sub
Optional properties for DIVA Player​
Property | Type | Default | Description | Impacted features |
---|---|---|---|---|
deepLinkType | string: 'relative' | 'absolute' | 'relative' | Type of deeplink to apply at startup: relative to the video start (or trimIn) or absolute. | |
deepLinkValue | string | [] | Value of deeplink to apply at startup: | |
preferredCCTrackName | string | Name of the CC track that will be set for Video Playback. | Video Playback | |
preferredCCMode | string | Set the CC mode for Video Playback. Available values: "Off", "On", "Instant replay", "When mute" | Video Playback | |
preferredAudioTrackName | string | Name of the audio track that will be set for Video Playback. | Video Playback | |
hdrMode | boolean | false | Sets HDR mode to turn on for Video Playback. | Video Playback |
darkerBackgroundCc | boolean | false | true - turn on the darker Background for CC, false - turn off the darker Background for CC. | Video Playback |
enlargedCc | boolean | false | true - enlarged Cc, false - standard CC size. | Video Playback |
opaqueBackground | boolean | false | Increase background opacity: true - transparent background, false - not transparent background, high contrast. | Video Playback |
ccEnhancementsOptionEnabled | boolean | false | Show/Hide the Caption style Btn in Subtitles menu: true - show, false - hide. | Video Playback |
transparencyOptionEnabled | boolean | false | Show/Hide the Transparency Btn (Increase contrast) in Settings menu: true - show, false - hide | Video Playback |
playerMode | string | "Fullscreen" | Init DIVA Player if fullscreen/chromeless video mode and music/podcast for AudioOnly Mode. Available values: VideoPlayer Mode - "Chromeless", "Fullscreen" and AudioOnly Mode: "music", "podcast" | Video Playback |
loop | boolean | false | Work only in Chromeless mode of the DIVA player. Loop playback | Video Playback |
SessionId | string | "" | UUID. In case the main application doesn't set "sessionId" in init params, then DivaPlayer will create "sessionId" by itself in the after calls "setLaunchParams" method of the DIVA player. | Video Playback |
Full configuration example​
Full configuration example
sub launchBOAdapter(divaLaunchParams as object)
m.boAdapterNode = CreateObject("roSGNode", "DivaBOAdapter:DivaBOAdapter")
m.boAdapterNode.initData = {
"settingId": "<settings URL>"
"videoId": "<video id>"
"dictionaryId": "en_GB"
"entitlementToken": "<entitlementToken>" 'Optional. Uses for Entitlement check. Token sends in the Entitlement request in "User" key
}
...
m.boAdapterNode.observeField("divaLaunchParams", "onBOAdapterDivaLaunchParamsHandler")
...
m.dpUtilsNode = CreateObject("roSGNode", "DivaPlayerSDK:DPUtilsNode")
...
end sub
sub onBOAdapterDivaLaunchParamsHandler(evt as dynamic)
data = evt.getData()
'Adding/modifying the initialization data DIVA Player
data.deepLinkType = "relative" '"absolute"
data.deepLinkValue = "60000" ' "2015-06-06T19:34:04.581Z" - for absolute
data.preferredCCTrackName = "en"
data.preferredCCMode = "On" '"Off", "On", "Instant replay", "When mute"
data.preferredAudioTrackName = "ambient"
data.hdrMode = false 'true
data.darkerBackgroundCc = true 'false
data.enlargedCc = true 'false
data.opaqueBackground = true 'false
data.ccEnhancementsOptionEnabled = true 'false
data.transparencyOptionEnabled = true 'false
data.playerMode = "Chromeless" '"music", "podcast". "Fullscreen" - by default
data.loop = true
data.devInfo = CreateObject("roDeviceInfo")
data.SessionId = devInfo.GetRandomUUID()
' Setup Diva Player launch parameters
m.dpUtilsNode.callFunc("setLaunchParams", data)
end sub