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​
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" '"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