Entitlement and DRM
What you learn​
You're instantiating DIVA Player in your Android front-end and relying on DIVA Back Office as the video streaming source.
The goal of this article is to build the simplest front-end to stream a video from the DIVA Back Office with entitlement check and DRM.
Before starting​
- Set up the development environment.
- Ensure the DIVA Back Office instance you rely on is up and running.
- Ask your video engineers team
<videoId>
,<settingsURL>
,<languageCountryCode>
,<userToken>
and<sharedKey>
. - Ensure the settings file contains:
- The
entitlementCheck
section:"entitlementCheck": {
"entitlementUrl": "<yourEntitlementBaseURL>/tokenize",
"heartbeatUrl": "<yourEntitlementBaseURL>/heartbeat",
"heartbeatPollingInterval": 180000,
"other": "{<sessionId>}|{<platform>}",
"fairPlayCertificateUrl": "<yourFairPlayCertificateBaseURL>/fairplay.cer"
} - The
videoPlatformsPriority
section:"videoPlatformsPriority": {
"default": [
{
"type": "DASH",
"sourceName": "Desktop-DASH",
"drmType": "playready"
},
{
"type": "DASH",
"sourceName": "Desktop-DASH",
"drmType": "widevine"
},
{
"type": "HLS",
"sourceName": "Desktop-V4",
"drmType": "fairplay"
}
],
"chromecast": [
{
"type": "DASH",
"sourceName": "Chromecast-DASH",
"drmType": "widevine"
}
]
- The
Instantiation​
DRM code​
There's no code to add to the Basic instantiation code.
Entitlement code​
There's no code to add to the Basic instantiation code. Just ensure to value the getCurrentUserAccountAccessToken
parameter with a valid <user access token>
when instantiating the DIVA Player:
getCurrentUserAccountAccessToken = {
//Get the user token
"<user access token>"
},