BO Adapter
This guide explains what's the BO Adapter and how to use it.
Overall scope​
Until version 4 of DIVA, the player and the back office were tightly coupled.
However, with the decision to support external video productions, the two environments have been decoupled.
Nevertheless, the case where projects integrate both DIVA Player and DIVA BO is still valid.
To enable communication between the two, an adapter has been created.
It is designed to mimic DIVA Player 4 logic excluded from DIVA Player 5.
This adapter is capable of receiving configuration data specific to DIVA BO and creating an ecosystem that allows DIVA Player to function.
BO Adapter init params​
The BO Adapter acts as a black box (with a slightly different situation for iOS and tvOS). It takes as input a series of parameters, including:
- URL pointing to the BO settings
- Starting videoId
- Language code
- callback function that returns the user token
- Entitlement specific parameters for tokenization and heartbeat
- Media analitics specific parameters
- Initialization parameters for DIVA Player (optional and specific for each platform)
- videoMetadataMap callback function (optional)
- ...
Workflow​
Once the BO Adapter is initialized, it follows the following steps:
- Downloads the BO settings.
- Uses the BO settings response and the language code to download the dictionary (not applicable to the BO Adapter Web Chromeless, which doesn't require translations).
- Initializes the media analytics plugins (Conviva, Youbora, etc.) based on the configurations present in the BO settings and initialization parameters.
- Defines the VideoMetadataProvider and the EntitlementProvider.
- Generates an initialization configuration for DIVA Player by merging the information from the setting node within the BO settings and the optional parameters provided during the initialization of the BO Adapter.
- Executes DIVA Player.
- Initiates the polling for VideoData updates based on the specifications in the BO settings.
BO Settings​
BO Adapter retrieves BO settings using the input parameter settingsUrl
and it expects response to be:
BO settings schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"settings": {
"type": "object",
"properties": {
"general": {
"type": "object",
"properties": {
"culture": {
"type": "string"
},
"audioSelectionMethod": {
"type": "string"
},
"closedCaptionSelectionMethod": {
"type": "string"
},
"backgroundImage": {
"type": "string"
},
"isCommentaryBadgeVisible": {
"type": "boolean"
},
"isCommentaryFilteredByChapter": {
"type": "boolean"
},
"isMiddleTimelineEventsLineEnabled": {
"type": "boolean"
},
"isMultiViewModeSwitchEnabled": {
"type": "boolean"
},
"isVideoThumbnailPreviewEnabled": {
"type": "boolean"
},
"isEndOfPlayEnabled": {
"type": "boolean"
},
"jumpLargeGaps": {
"type": "boolean"
},
"liveBackOff": {
"type": "integer"
},
"pipMode": {
"type": "boolean"
},
"relevantCommentaryStartsVisible": {
"type": "boolean"
},
"resolveManifestUrl": {
"type": "boolean"
},
"smallGapLimit": {
"type": "integer"
},
"trackVideoDataManifest": {
"type": "boolean"
},
"videoAnalyticsEventFrequency": {
"type": "integer"
}
},
"required": [
"culture"
]
},
"videoCast": {
"type": "object",
"properties": {
"castBackground": {
"type": "string"
},
"chromecastAppID": {
"type": "string"
},
"isAirplayEnabled": {
"type": "boolean"
}
},
"required": ["castBackground", "chromecastAppID", "isAirplayEnabled"]
},
"pushEngine": {
"type": "object",
"properties": {
"configUrl": {
"type": "string"
},
"isFragmentsEnabled": {
"type": "boolean"
},
"playByPlayCollectionName": {
"type": "string"
},
"playByPlayScopeName": {
"type": "string"
},
"dataPanelsCollectionName": {
"type": "string"
},
"dataPanelsScopeName": {
"type": "string"
},
"eCommerceCollectionName": {
"type": "string"
}
},
"required": [
"configUrl"
]
},
"syncDataPanels": {
"type": "object",
"properties": {
"dataFolderUrl": {
"type": "string"
},
"renderingFolderUrl": {
"type": "string"
},
"templateForTracksId": {
"type": "string"
},
"trustedOrigins": {
"type": "string"
},
"defaultTrack": {
"type": "string"
}
},
"required": []
},
"customPlayByPlay": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": ["key", "value"]
}
}
},
"required": ["general", "videoCast", "pushEngine", "syncDataPanels", "customPlayByPlay"]
},
"translations": {
"type": "object",
"properties": {
"vocabularySource": {
"type": "string"
}
},
"required": ["vocabularySource"]
},
"videoData": {
"type": "object",
"properties": {
"videoDataPath": {
"type": "string"
},
"videoDataPollingInterval": {
"type": "integer"
},
"videoPlatformsPriority": {
"type": "object",
"properties": {
"default": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"sourceName": {
"type": "string"
},
"drmType": {
"type": "string"
}
},
"required": ["type", "sourceName", "drmType"]
}
},
"chromecast": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"sourceName": {
"type": "string"
},
"drmType": {
"type": "string"
}
},
"required": ["type", "sourceName", "drmType"]
}
}
},
"required": ["default", "chromecast"]
}
},
"required": ["videoDataPath", "videoDataPollingInterval", "videoPlatformsPriority"]
},
"entitlementCheck": {
"type": "object",
"properties": {
"entitlementUrl": {
"type": "string"
},
"heartbeatUrl": {
"type": "string"
},
"heartbeatPollingInterval": {
"type": "integer"
},
"heartbeatSeekInterval": {
"type": "integer"
},
"other": {
"type": "string"
},
"fairPlayCertificateUrl": {
"type": "string"
},
"queryParams": {
"type": "array",
"items": {
"type": "string"
}
},
data: {
type: 'object',
}
},
"required": ["entitlementUrl", "heartbeatUrl", "heartbeatPollingInterval", "other", "fairPlayCertificateUrl"]
},
"mediaAnalytics": {
"type": "object",
"properties": {
"conviva": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"customerKey": {
"type": "string"
},
"playerName": {
"type": "string"
},
"cdnName": {
"type": "string"
},
"touchstoneUrl": {
"type": "string"
}
},
"required": ["enabled", "customerKey", "playerName", "cdnName", "touchstoneUrl"]
},
"youbora": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"playerName": {
"type": "string"
},
"cdnName": {
"type": "string"
},
"accountCode": {
"type": "string"
}
},
"required": ["enabled", "playerName", "cdnName", "accountCode"]
},
"openMeasurement": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"partnerName": {
"type": "string"
}
},
"required": ["enabled", "partnerName"]
}
}
},
"ssai": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"interval": {
"type": "number"
},
"threshold": {
"type": "number"
},
"liveEdgeThreshold": {
"type": "number"
},
"lookAhead": {
"type": "number"
}
},
"enableGooglePAL": {
"type": "boolean"
}
},
}
},
"required": ["settings", "translations", "videoData", "entitlementCheck", "mediaAnalytics"]
}
BO settings sample
{
"settings": {
"general": {
"culture": "{fe.cultureCode}",
"audioSelectionMethod": "title",
"closedCaptionSelectionMethod": "lang",
"backgroundImage": "",
"isCommentaryBadgeVisible": true,
"isCommentaryFilteredByChapter": false,
"isMiddleTimelineEventsLineEnabled": false,
"isMultiViewModeSwitchEnabled": false,
"isVideoThumbnailPreviewEnabled": false,
"isEndOfPlayEnabled": false,
"jumpLargeGaps": false,
"liveBackOff": 1000,
"pipMode": true,
"relevantCommentaryStartsVisible": false,
"resolveManifestUrl": false,
"smallGapLimit": 5,
"trackVideoDataManifest": false,
"videoAnalyticsEventFrequency": 30000
},
"videoCast": {
"castBackground": "https://example.com/fe/images/chromecastbg.png",
"chromecastAppID": "6CBA5579",
"isAirplayEnabled": true
},
"pushEngine": {
"configUrl": "https://example.com/fe/config/pushengine/pushengineConfig.json",
"isFragmentsEnabled": true,
"playByPlayCollectionName": "PlayByPlay",
"playByPlayScopeName": "{v.EventID}.{d.Culture}",
"dataPanelsCollectionName": "OverlayLiteData",
"dataPanelsScopeName": "{v.EventID}.{d.Culture}",
"eCommerceCollectionName": " "
},
"syncDataPanels": {
"dataFolderUrl": "https://example.com/fe/provider/overlays/DivaData/OverlayLiteData/{v.EventId}.{d.Culture}/{OverlayID}.xml",
"renderingFolderUrl": "https://example.com/fe/provider/overlays/DivaData/RenderingLiteData{n:ResourceURI}",
"templateForTracksId": "lineups:sideBySide;teamstats:fullVideo",
"trustedOrigins": "https://example.com",
"defaultTrack": "menu"
},
"customPlayByPlay": [
{
"key": "handball_bluecard_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_bluecard_big.png"
},
{
"key": "handball_bluecard_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_bluecard_mini.png"
},
{
"key": "handball_breakstart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_breakstart_big.png"
},
{
"key": "handball_breakstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_breakstart_mini.png"
},
{
"key": "handball_firstextratimestart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstextratimestart_big.png"
},
{
"key": "handball_firstextratimestart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstextratimestart_mini.png"
},
{
"key": "handball_firstovertimestart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstovertimestart_big.png"
},
{
"key": "handball_firstovertimestart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstovertimestart_mini.png"
},
{
"key": "handball_firstperiodstart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstperiodstart_big.png"
},
{
"key": "handball_firstperiodstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstperiodstart_mini.png"
},
{
"key": "handball_score_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_score_big.png"
},
{
"key": "handball_score_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_score_mini.png"
},
{
"key": "handball_matchstart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_matchstart_big.png"
},
{
"key": "handball_matchstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_matchstart_mini.png"
},
{
"key": "handball_penaltystart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_penaltystart_big.png"
},
{
"key": "handball_penaltystart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_penaltystart_mini.png"
},
{
"key": "handball_redcard_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_redcard_big.png"
},
{
"key": "handball_redcard_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_redcard_mini.png"
},
{
"key": "handball_secondperiodstart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_secondperiodstart_big.png"
},
{
"key": "handball_secondperiodstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_secondperiodstart_mini.png"
},
{
"key": "handball_sevenmeterthrowawarded_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_sevenmeterthrowawarded_big.png"
},
{
"key": "handball_sevenmeterthrowawarded_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_sevenmeterthrowawarded_mini.png"
},
{
"key": "handball_shotblocked_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_shotblocked_big.png"
},
{
"key": "handball_shotblocked_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_shotblocked_mini.png"
},
{
"key": "handball_shotsaved_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_shotsaved_big.png"
},
{
"key": "handball_shotsaved_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_shotsaved_mini.png"
},
{
"key": "handball_steal_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_steal_big.png"
},
{
"key": "handball_steal_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_steal_mini.png"
},
{
"key": "handball_substitutionoff_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_substitutionoff_big.png"
},
{
"key": "handball_substitutionoff_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_substitutionoff_mini.png"
},
{
"key": "handball_substitutionon_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_substitutionon_big.png"
},
{
"key": "handball_substitutionon_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_substitutionon_mini.png"
},
{
"key": "handball_suspension_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_suspension_big.png"
},
{
"key": "handball_suspension_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_suspension_mini.png"
},
{
"key": "handball_timeoutend_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_timeoutend_big.png"
},
{
"key": "handball_timeoutend_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_timeoutend_mini.png"
},
{
"key": "handball_timeoutstart_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_timeoutstart_big.png"
},
{
"key": "handball_timeoutstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_timeoutstart_mini.png"
},
{
"key": "handball_yellowcard_Big",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_yellowcard_big.png"
},
{
"key": "handball_yellowcard_Mini",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_yellowcard_mini.png"
},
{
"key": "handball_score",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_score_big.png"
},
{
"key": "handball_yellowcard",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_score_big.png"
},
{
"key": "handball_timeoutstart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_timeoutstart_big.png"
},
{
"key": "handball_timeoutend",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_timeoutend_big.png"
},
{
"key": "handball_suspension",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_suspension_big.png"
},
{
"key": "handball_substitutionon",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_substitutionon_big.png"
},
{
"key": "handball_substitutionoff",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_substitutionoff_big.png"
},
{
"key": "handball_steal",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_steal_big.png"
},
{
"key": "handball_shotsaved",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_shotsaved_big.png"
},
{
"key": "handball_shotblocked",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_shotblocked_big.png"
},
{
"key": "handball_sevenmeterthrowawarded",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_sevenmeterthrowawarded_big.png"
},
{
"key": "handball_secondperiodstart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_secondperiodstart_big.png"
},
{
"key": "handball_redcard",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_redcard_big.png"
},
{
"key": "handball_penaltystart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_penaltystart_big.png"
},
{
"key": "handball_matchstart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_matchstart_big.png"
},
{
"key": "handball_score",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_score_big.png"
},
{
"key": "handball_firstperiodstart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstperiodstart_big.png"
},
{
"key": "handball_firstovertimestart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstovertimestart_big.png"
},
{
"key": "handball_firstextratimestart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_firstextratimestart_big.png"
},
{
"key": "handball_breakstart",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_breakstart_big.png"
},
{
"key": "handball_bluecard",
"value": "https://example.com/fe/overlayassets/icons/handball/{p.density}/handball_bluecard_big.png"
},
{
"key": "basketball_firstperiodstart",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_firstperiodstart_big.png"
},
{
"key": "basketball_secondperiodstart",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_secondperiodstart_big.png"
},
{
"key": "basketball_thirdperiodstart",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_thirdperiodstart_big.png"
},
{
"key": "basketball_fourthperiodstart",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_fourthperiodstart_big.png"
},
{
"key": "basketball_firstperiodend",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_firstperiodend_big.png"
},
{
"key": "basketball_secondperiodend",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_secondperiodend_big.png"
},
{
"key": "basketball_thirdperiodend",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_thirdperiodend_big.png"
},
{
"key": "basketball_fourthperiodend",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_fourthperiodend_big.png"
},
{
"key": "basketball_twopoint",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_twopoint_big.png"
},
{
"key": "basketball_threepoint",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_threepoint_big.png"
},
{
"key": "basketball_foul",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_foul_big.png"
},
{
"key": "basketball_freethrowscore",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_freethrowscore_big.png"
},
{
"key": "basketball_freethrowmiss",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_freethrowmiss_big.png"
},
{
"key": "basketball_timeout",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_timeout_big.png"
},
{
"key": "basketball_substitutionon",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_substitutionon_big.png"
},
{
"key": "basketball_substitutionoff",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_substitutionoff_big.png"
},
{
"key": "basketball_firstperiodstart_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_firstperiodstart_big.png"
},
{
"key": "basketball_secondperiodstart_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_secondperiodstart_big.png"
},
{
"key": "basketball_thirdperiodstart_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_thirdperiodstart_big.png"
},
{
"key": "basketball_fourthperiodstart_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_fourthperiodstart_big.png"
},
{
"key": "basketball_firstperiodend_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_firstperiodend_big.png"
},
{
"key": "basketball_secondperiodend_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_secondperiodend_big.png"
},
{
"key": "basketball_thirdperiodend_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_thirdperiodend_big.png"
},
{
"key": "basketball_fourthperiodend_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_fourthperiodend_big.png"
},
{
"key": "basketball_twopoint_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_twopoint_big.png"
},
{
"key": "basketball_threepoint_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_threepoint_big.png"
},
{
"key": "basketball_foul_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_foul_big.png"
},
{
"key": "basketball_freethrowscore_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_freethrowscore_big.png"
},
{
"key": "basketball_freethrowmiss_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_freethrowmiss_big.png"
},
{
"key": "basketball_timeout_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_timeout_big.png"
},
{
"key": "basketball_substitutionon_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_substitutionon_big.png"
},
{
"key": "basketball_substitutionoff_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_substitutionoff_big.png"
},
{
"key": "basketball_firstperiodstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_firstperiodstart_mini.png"
},
{
"key": "basketball_secondperiodstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_secondperiodstart_mini.png"
},
{
"key": "basketball_thirdperiodstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_thirdperiodstart_mini.png"
},
{
"key": "basketball_fourthperiodstart_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_fourthperiodstart_mini.png"
},
{
"key": "basketball_firstperiodend_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_firstperiodend_mini.png"
},
{
"key": "basketball_secondperiodend_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_secondperiodend_mini.png"
},
{
"key": "basketball_thirdperiodend_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_thirdperiodend_mini.png"
},
{
"key": "basketball_fourthperiodend_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_fourthperiodend_mini.png"
},
{
"key": "basketball_twopoint_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_twopoint_mini.png"
},
{
"key": "basketball_threepoint_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_threepoint_mini.png"
},
{
"key": "basketball_foul_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_foul_mini.png"
},
{
"key": "basketball_freethrowscore_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_freethrowscore_mini.png"
},
{
"key": "basketball_freethrowmiss_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_freethrowmiss_mini.png"
},
{
"key": "basketball_timeout_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_timeout_mini.png"
},
{
"key": "basketball_substitutionon_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_substitutionon_mini.png"
},
{
"key": "basketball_substitutionoff_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_substitutionoff_mini.png"
},
{
"key": "basketball_dunk_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_dunk_mini.png"
},
{
"key": "basketball_dunk_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_dunk_big.png"
},
{
"key": "basketball_ejection",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_ejection_big.png"
},
{
"key": "basketball_ejection_Big",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_ejection_big.png"
},
{
"key": "basketball_ejection_Mini",
"value": "https://example.com/fe/overlayassets/icons/basketball/{p.density}/basketball_ejection_mini.png"
}
]
},
"translations": {
"vocabularySource": "https://example.com/diva5/dictionaries/{fe.cultureCode}.json"
},
"videoData": {
"videoDataPath": "https://example.com/fe/video/videodata/v2/{v.id}",
"videoDataPollingInterval": 20000,
"videoPlatformsPriority": {
"default": [
{
"type": "DASH",
"sourceName": "Desktop-DASH",
"drmType": "widevine"
},
{
"type": "HLS",
"sourceName": "Desktop-V4",
"drmType": "fairplay"
}
],
"chromecast": [
{
"type": "DASH",
"sourceName": "Chromecast-DASH",
"drmType": "widevine"
}
]
}
},
"entitlementCheck": {
"entitlementUrl": "https://example.com/api/playback/tokenize",
"heartbeatUrl": "https://example.com/api/playback/heartbeat",
"heartbeatPollingInterval": 180000,
"heartbeatSeekInterval": 10000,
"other": "{Run.SessionID}|{p.platform}",
"fairPlayCertificateUrl": "https://example.com/diva5/certificates/fairplay.cer",
"queryParams": ["VideoSourceName", "VideoId", "VideoKind"],
"data": {
"sessionId": "{Run.SessionID}",
"platform": "webTV custom/Amidala",
"idfa": "{Run.idfa}"
},
},
"mediaAnalytics": {
"conviva": {
"enabled": false,
"customerKey": "conviva-customer-key",
"playerName": "Diva",
"cdnName": "Akamai",
"touchstoneUrl": "https://touchstone.conviva.com/example/"
},
"youbora": {
"enabled": true,
"playerName": "Diva",
"cdnName": "Akamai",
"accountCode": "<account code>"
},
"openMeasurement": {
"enabled": true,
"partnerName": "Deltatre"
}
},
"ssai": {
"type": "harmonic",
"interval": 2000,
"threshold": 1000,
"liveEdgeThreshold": 45000,
"lookAhead": 5000,
"enableGooglePAL": true,
}
}
{fe.cultureCode}
inside boSettings.settings.general.culture will be replaced with BO Adapter languageCode
init property;
VideoMetadataProvider​
Right after BO settings has been fetched and parsed an instance of the VideoMetadataProvider is created.
This is a provider function passed to the player that allows DIVA to request VideoMetadata for a specific video. When invoked, the VideoMetadataProvider of the BO Adapter follows the following steps:
- It uses the URL present under
BOsettings.videoData.videoDataPath
, replaces the placeholder with the currentvideoId
, and fetches the BO VideoData. - Using
BOsettings.videoPriority
andplaybackState
(default or chromecast) from the videoMetadata request parameters, it filters and sorts the videoSources in BO VideoData and translates them to VideoMetadata Sources. - It sets all the configurations in VideoSources and VideoMetadata CustomAttributes related to DRM.
- It creates the output VideoMetadata.
- If provided, it passes the output through the videoMetadataMap function.
- It returns the VideoMetadata to the DIVA Player.
BO VideoData schema
{
"$ref": "#/definitions/VideoData",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AudioTrackBo": {
"additionalProperties": false,
"properties": {
"displayName": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": ["id", "displayName"],
"type": "object"
},
"DrmBo": {
"additionalProperties": {
"$ref": "#/definitions/DrmDataBo"
},
"type": "object"
},
"DrmDataBo": {
"additionalProperties": false,
"properties": {
"authType": {
"type": "string"
},
"contentKeyData": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"licenseUrl": {
"type": "string"
},
"provider": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": ["enabled"],
"type": "object"
},
"LivelikeBo": {
"additionalProperties": false,
"properties": {
"programId": {}
},
"required": ["programId"],
"type": "object"
},
"Mode360": {
"enum": ["MONOSCOPIC360", "UPDOWN360"],
"type": "string"
},
"SourceBo": {
"additionalProperties": false,
"properties": {
"daiType": {
"type": "string"
},
"drm": {
"$ref": "#/definitions/DrmBo"
},
"dvrType": {
"type": "string"
},
"format": {
"type": "string"
},
"hdrType": {
"type": "string"
},
"name": {
"type": "string"
},
"offset": {
"type": "number"
},
"origin": {
"type": "string"
},
"timeMap": {
"items": {
"$ref": "#/definitions/TimeMapBo"
},
"type": "array"
},
"uri": {
"type": "string"
}
},
"required": ["uri", "format", "name", "origin", "daiType", "hdrType", "dvrType", "offset", "timeMap"],
"type": "object"
},
"TimeMapBo": {
"additionalProperties": false,
"properties": {
"end": {
"type": "number"
},
"offset": {
"type": "number"
},
"start": {
"type": "number"
}
},
"required": ["start", "end", "offset"],
"type": "object"
},
"VideoData": {
"additionalProperties": false,
"properties": {
"assetState": {
"type": "string"
},
"audioTracks": {
"items": {
"$ref": "#/definitions/AudioTrackBo"
},
"type": "array"
},
"capabilities": {
"additionalProperties": false,
"properties": {
"cc": {
"type": "boolean"
},
"commentary": {
"type": "boolean"
},
"dataPanels": {
"type": "boolean"
},
"multicam": {
"type": "boolean"
},
"multicam360": {
"type": "boolean"
},
"score": {
"type": "boolean"
},
"timeline": {
"type": "boolean"
},
"xRay": {
"type": "boolean"
}
},
"required": ["score", "commentary", "timeline", "multicam", "multicam360", "dataPanels", "cc", "xRay"],
"type": "object"
},
"categories": {
"additionalProperties": {},
"type": "object"
},
"customAttributes": {
"additionalProperties": false,
"properties": {
"EstimatedDurationMs": {
"type": "string"
},
"ScheduledAt": {
"type": "string"
},
"WORKFLOW": {
"type": "string"
},
"v_available_display_end_date": {
"type": "string"
},
"v_available_display_start_date": {
"type": "string"
},
"v_channel_name": {
"type": "string"
},
"v_editorial_type": {
"type": "string"
},
"v_gameday_competition_name": {
"type": "string"
},
"v_gameday_ko_date": {
"type": "string"
},
"v_gameday_related_competition_id": {
"type": "string"
},
"v_gameday_related_event_id": {
"type": "string"
},
"v_gameday_related_season_id": {
"type": "string"
},
"v_gameday_related_stage_id": {
"type": "string"
},
"v_gameday_season_year": {
"type": "string"
},
"v_gameday_stage_name": {
"type": "string"
},
"v_gameday_team_a_home": {
"type": "string"
},
"v_gameday_team_a_id": {
"type": "string"
},
"v_gameday_team_a_name": {
"type": "string"
},
"v_gameday_team_b_home": {
"type": "string"
},
"v_gameday_team_b_id": {
"type": "string"
},
"v_gameday_team_b_name": {
"type": "string"
},
"v_has_data": {
"type": "string"
},
"v_image_16_9": {
"type": "string"
},
"v_image_1_1": {
"type": "string"
},
"v_image_3_1": {
"type": "string"
},
"v_image_4_3": {
"type": "string"
},
"v_portability": {
"type": "string"
},
"v_provider_creation_date": {
"type": "string"
},
"v_provider_ext_event_id": {
"type": "string"
},
"v_provider_mimir_id": {
"type": "string"
},
"v_provider_updated_date": {
"type": "string"
},
"v_schedule_end": {
"type": "string"
},
"v_schedule_start": {
"type": "string"
},
"v_sport": {
"type": "string"
},
"v_subscription": {
"type": "string"
},
"v_video_provider": {
"type": "string"
}
},
"required": [
"v_video_provider",
"v_available_display_start_date",
"v_available_display_end_date",
"v_schedule_start",
"v_schedule_end",
"v_channel_name",
"v_has_data",
"v_sport",
"v_editorial_type",
"v_provider_creation_date",
"v_provider_updated_date",
"v_provider_mimir_id",
"v_provider_ext_event_id",
"v_gameday_related_event_id",
"v_gameday_ko_date",
"v_gameday_related_competition_id",
"v_gameday_competition_name",
"v_gameday_related_season_id",
"v_gameday_season_year",
"v_gameday_related_stage_id",
"v_gameday_stage_name",
"v_gameday_team_a_id",
"v_gameday_team_b_id",
"v_gameday_team_a_name",
"v_gameday_team_b_name",
"v_gameday_team_a_home",
"v_gameday_team_b_home",
"v_image_16_9",
"v_image_4_3",
"v_image_3_1",
"v_image_1_1",
"v_portability",
"v_subscription",
"WORKFLOW",
"EstimatedDurationMs",
"ScheduledAt"
],
"type": "object"
},
"description": {
"type": ["string", "null"]
},
"event": {
"additionalProperties": false,
"properties": {
"eventId": {
"type": "string"
}
},
"type": "object"
},
"expectedDuration": {
"type": "number"
},
"image": {
"type": ["string", "null"]
},
"is360": {
"type": "boolean"
},
"isMultistream": {
"type": "boolean"
},
"isPrivate": {
"type": "boolean"
},
"livelike": {
"$ref": "#/definitions/LivelikeBo"
},
"mode360": {
"$ref": "#/definitions/Mode360"
},
"preroll": {
"type": ["string", "null"]
},
"programDateTime": {
"type": "number"
},
"sources": {
"items": {
"$ref": "#/definitions/SourceBo"
},
"type": "array"
},
"tags": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"externalId": {
"type": "null"
},
"externalSource": {
"type": "null"
}
},
"required": ["externalSource", "externalId"],
"type": "object"
},
"type": "object"
},
"thirdPartyContentProvider": {},
"title": {
"type": "string"
},
"trimIn": {
"type": "number"
},
"trimOut": {
"type": "number"
},
"videoId": {
"type": "string"
}
},
"required": [
"videoId",
"title",
"description",
"image",
"preroll",
"programDateTime",
"trimIn",
"trimOut",
"expectedDuration",
"assetState",
"isMultistream",
"is360",
"mode360",
"isPrivate",
"thirdPartyContentProvider",
"audioTracks",
"categories",
"customAttributes",
"capabilities",
"livelike",
"sources"
],
"type": "object"
}
}
}
BO VideoData sample
{
"videoId": "example",
"title": "Video title",
"description": "Video description",
"image": null,
"camId": null,
"event": {
"code": null,
"id": null
},
"programDateTime": 1691251211667,
"trimIn": 0,
"trimOut": 0,
"expectedDuration": 7215530,
"assetState": "vod",
"preroll": null,
"postroll": null,
"alternateId": null,
"isMultistream": false,
"kind": null,
"is360": false,
"mode360": "NONE",
"isPrivate": false,
"thirdPartyContentProvider": null,
"originSource": null,
"audioTracks": [
{
"id": "primary",
"displayName": ""
},
{
"id": "secondary",
"displayName": ""
}
],
"categories": {
"category1": null,
"category2": null,
"category3": null,
"category4": null,
"category5": null,
"category6": null,
"category7": null,
"category8": null,
"category9": null,
"category10": null
},
"customAttributes": {
"v_video_provider": "harmonic",
"v_available_display_start_date": "",
"v_available_display_end_date": "",
"v_schedule_start": "2023-08-05T16:00:00.000000Z",
"v_schedule_end": "2023-08-05T18:00:00.000000Z",
"v_channel_name": "svc-ch-hd-01",
"v_has_data": "true",
"v_sport": "Handball",
"v_editorial_type": "LIVE Spiel",
"v_provider_creation_date": "",
"v_provider_updated_date": "",
"v_provider_mimir_id": "",
"v_provider_ext_event_id": "sportradar_sr:sport_event:34738993",
"v_gameday_related_event_id": "",
"v_gameday_ko_date": "2023-04-23T12:05:00.000Z",
"v_gameday_related_competition_id": "urn:gd:competition:HBL",
"v_gameday_competition_name": "Bundesliga",
"v_gameday_related_season_id": "sportradar_sr:season:95685",
"v_gameday_season_year": "2022",
"v_gameday_related_stage_id": "sportradar_sr:league:67095",
"v_gameday_stage_name": "Bundesliga 22/23",
"v_gameday_team_a_id": "stickyTag_urn:gd:club:gamedaydproxy:sr:competitor:3980:Gameday:team:code:main",
"v_gameday_team_b_id": "stickyTag_urn:gd:club:gamedaydproxy:sr:competitor:3993:Gameday:team:code:main",
"v_gameday_team_a_name": "THW Kiel",
"v_gameday_team_b_name": "SG Flensburg-Handewitt",
"v_gameday_team_a_home": "true",
"v_gameday_team_b_home": "false",
"v_image_16_9": "",
"v_image_4_3": "",
"v_image_3_1": "",
"v_image_1_1": "",
"v_portability": "EU,DE,CH,AU",
"v_subscription": "",
"WORKFLOW": "LIVE",
"EstimatedDurationMs": "7200000",
"ScheduledAt": "2023-08-05T16:00:00.0000000+00:00"
},
"tags": {},
"translations": {},
"capabilities": {
"score": true,
"commentary": true,
"timeline": true,
"multicam": true,
"multicam360": true,
"dataPanels": true,
"cc": false,
"xRay": true
},
"livelike": {
"programId": null
},
"sources": [
{
"uri": "https://example.com/Content/DASH/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/manifest.mpd",
"format": "DASH",
"name": "Desktop-DASH",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"playready": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
"provider": "castlabs"
},
"widevine": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
"provider": "castlabs"
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/DASH/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/manifest.mpd",
"format": "DASH",
"name": "Mobile-DASH",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"playready": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
"provider": "castlabs"
},
"widevine": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
"provider": "castlabs"
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/DASH/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/manifest.mpd",
"format": "DASH",
"name": "Connected-TV-DASH",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"playready": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
"provider": "castlabs"
},
"widevine": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
"provider": "castlabs"
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/DASH/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/manifest.mpd",
"format": "DASH",
"name": "Roku-DASH",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"playready": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
"provider": "castlabs"
},
"widevine": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
"provider": "castlabs"
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/DASH/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/manifest.mpd",
"format": "DASH",
"name": "Chromecast-DASH",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"playready": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
"provider": "castlabs"
},
"widevine": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
"provider": "castlabs"
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/HLSv4/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/index.m3u8",
"format": "HLS",
"name": "Desktop-V4",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-server-fairplay/",
"provider": "castlabs"
},
"playready": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"widevine": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/HLSv4/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/index.m3u8",
"format": "HLS",
"name": "Mobile-V4",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-server-fairplay/",
"provider": "castlabs"
},
"playready": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"widevine": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/HLSv4/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/index.m3u8",
"format": "HLS",
"name": "Chromecast-V4",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-server-fairplay/",
"provider": "castlabs"
},
"playready": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"widevine": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
},
{
"uri": "https://example.com/Content/HLSv4/LLCU/e12e1393-e4b3-4bdf-92bd-45db6ca2436e/index.m3u8",
"format": "HLS",
"name": "Connected-TV-V4",
"origin": "harmonic",
"drm": {
"aes": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"fairplay": {
"enabled": true,
"authType": "Token",
"contentKeyData": "REPLAY-e12e1393-e4b3-4bdf-92bd-45db6ca2436e",
"licenseUrl": "https://lic.staging.drmtoday.com/license-server-fairplay/",
"provider": "castlabs"
},
"playready": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
},
"widevine": {
"enabled": false,
"authType": null,
"contentKeyData": null,
"licenseUrl": null,
"provider": null
}
},
"daiType": "none",
"hdrType": "none",
"dvrType": "full",
"offset": 0,
"timeMap": [
{
"start": -9007199254740991,
"end": 9007199254740991,
"offset": 0
}
]
}
]
}
VideoMetadataMap​
This is an asynchronous callback function set during the initialization of the BO adapter. This function receives a VideoMetadata as a parameter and returns a possibly modified VideoMetadata. This function is useful in case the integrator wants to enrich the VideoMetadata with additional information or modify some data based on specific needs.
Some examples of use cases could include:
- Adding client-side advertisement by populating the 'ad' property
- Adding a background image for the video by populating the 'image' property
- Modifying audio tracks.
- ...
This is asynchronous in order to allow the integrator to perform any kind of asynchronous operations to modify the data.
EntitlementProvider​
After receiving the BO settings, an EntitlementProvider is created within the BO Adapter.
This is instantiated using the data from the initialization parameters related to entitlement, the user token, and the entitlement information present in the BO settings.
The EntitlementProvider is called by the DIVA Player, passing the type of request (processUrl or heartbeat), the VideoMetadata, and the VideoSource.
The provider uses the value present in BoSettings.entitlementCheck.entitlementUrl to make a POST call to the entitlement service, including in the request body all the necessary information retrieved from the input parameters, VideoMetadata, and VideoSource.
If both the data and version parameters are present in the BO settings, they will be included in the request body.
The data parameter is a map of key-value pairs. The values can be simply string or placeholders that will be replaced by the Path resolver.
Path resolver is also populated with the data initialization parameter of the BO Adapter.
Example
Bo settings:
...
{
"entitlementCheck": {
"entitlementUrl": "URL_TO_ENTITLEMENT_SERVICE",
"heartbeatUrl": "URL_TO_HEARTBET_SERVICE",
"heartbeatPollingInterval": 0,
"other": "{Run.SessionID}|lamiaplatform|{idfa}",
"fairPlayCertificateUrl": "URL_TO_FAIRPLAY_CERTIFICATE",
"data": {
"sessionId": "{Run.SessionID}",
"platform": "webTV custom/Amidala",
"idfa": "{Run.idfa}",
}
}
...
}
Bo adapter initialization:
const entitlementConfiguration = {
entitlementUser: () => {
return "USER_TOKEN";
},
entitlementPayloadMap: (type, payload) => {
// Modify the payload
return payload;
},
// If the version is set, `Data` will be included in the request body
version: "1",
}
...
<DivaWebBoAdapter
settingsUrl={SETTINGS_URL}
languageCode={"en-US"}
config={config}
entitlementConfiguration={entitlementConfiguration}
/>
Note: the key names of the data parameter will be added to the path resolver using "run." prefix.
Entitlement request body:
{
"Type":1,
"User":"USER TOKEN",
"VideoId":"VIDEO ID",
"VideoSource":"VIDEO SOURCE URL",
...
"Version":"1",
"Data":"{\"sessionId\":\"B71D53A1-32D6-2DA6-7C8A-CB4F22FCF172\",\"platform\":\"webTV custom/Amidala\",\"idfa\":\"123456\",\"offsetFromLiveEdge\":\"0\"}"
}
Note: SessionId and offsetFromLiveEdge are replaced by default by DIVA.
Data parameter contains the json stringified data object with the values replaced by the path resolver.
If the response to the call is positive, the EntitlementProvider returns to the DIVA Player a response containing: licenseUrl, token, headers, and heartbeat interval.
The headers will be creating depending on the provider of the VideoSource.
In the case of a negative outcome, an error will be returned to the DIVA Player.
Entitlement and Entitlement Provider documentation.
EntitlementPayloadMap​
This is an asynchronous callback function the integrator can set during the initialization of the BO adapter, inside the entitlementConfiguration node. Its purpose is to allow the integrator to modify the entitlement request body before sending it to the entitlement service. If provided, this function will be called right before performing the entitlment request. It receives the type of the entitlement call ('token' or 'heartbeat') and the payload of the entitlement request as a parameter and returns a possibly modified payload.
Platform implemetations​
Here a list of the specific implementations for each platform.
Web
Web TV
Web Chromeless
Android / AndroidTV
iOS / tvOS has an important peculiarity where Diva player is initialized by integrator, more information in the previous link.
Roku