Skip to main content

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​

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 connecting m.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​

PropertyDescriptionTypeDefault value
videoIdThe video Idstring-
settingIdThe URL of the settings filestring-
dictionaryIdLanguage codestring-

Other Optional properties for DIVA BO Adapter​

PropertyTypeDefaultDescriptionImpacted features
entitlementTokenstring""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​

PropertyTypeDefaultDescriptionImpacted features
deepLinkTypestring: 'relative' | 'absolute''relative'

Type of deeplink to apply at startup: relative to the video start (or trimIn) or absolute.

deepLinkValuestring[]

Value of deeplink to apply at startup:
type relative -> number of milliseconds
type absolute -> ISO 8801 datetime.
A value at a specific position applies to the videoId at the corresponding index.

preferredCCTrackNamestringName of the CC track that will be set for Video Playback.Video Playback
preferredCCModestringSet the CC mode for Video Playback. Available values: "Off", "On", "Instant replay", "When mute"Video Playback
preferredAudioTrackNamestringName of the audio track that will be set for Video Playback.Video Playback
hdrModebooleanfalseSets HDR mode to turn on for Video Playback.Video Playback
darkerBackgroundCcbooleanfalsetrue - turn on the darker Background for CC, false - turn off the darker Background for CC.Video Playback
enlargedCcbooleanfalsetrue - enlarged Cc, false - standard CC size.Video Playback
opaqueBackgroundbooleanfalseIncrease background opacity: true - transparent background, false - not transparent background, high contrast.Video Playback
ccEnhancementsOptionEnabledbooleanfalseShow/Hide the Caption style Btn in Subtitles menu: true - show, false - hide.Video Playback
transparencyOptionEnabledbooleanfalseShow/Hide the Transparency Btn (Increase contrast) in Settings menu: true - show, false - hideVideo Playback
playerModestring"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
loopbooleanfalseWork only in Chromeless mode of the DIVA player. Loop playbackVideo Playback
SessionIdstring""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