DoveRunner on Web
This article describes how to configure DoveRunner Multi-DRM with THEOplayer. This content is based on DoveRunner's documentation.
Note: The details in the guide apply for DoveRunner (formerly known as "PallyCon"). While most details, API hostnames and variables have been updated to reflect DoveRunner, certain configurations such as the pallycon-customdata-v2 HTTP request header will still apply.
Head to our page on DRM for more general information.
Support for this DRM system has not been verified on the Chromecast SDK.
Integration
We provide open-source DRM integrations which are easy to maintain and allow for a modular approach. You can find them in the DRM integration samples repository, alongside guides on how to integrate and use them.
There currently is no ready-made integration for this DRM provider: you can choose to develop one based on the examples in the repository, or get in contact with us about making one.
Code example
if (HLS) {
const certificateUrl = "<CERTIFICATE_URL>";
// a response interceptor for the certificate URL might be required.
player.network.addResponseInterceptor(function(response) {
if(response.url == certificateUrl) {
const rawResponse = response.body;
const responseText = String.fromCharCode.apply(null, new Uint8Array(rawResponse));
const raw = window.atob(responseText);
const rawLength = raw.length;
let certificate = new Uint8Array(new ArrayBuffer(rawLength));
for(let i = 0; i < rawLength; i++)
certificate[i] = raw.charCodeAt(i);
response.respondWith({body: certificate})
}
});
const drmConfiguration = {
"fairplay": {
"licenseAcquisitionURL": "<LICENSE_KEY_URL_FAIRPLAY>",
"certificateURL": certificateUrl,
"headers": {
"<CUSTOM_HEADER_NAME>" : "<CUSTOM_HEADER_VALUE>" // e.g. 'pallycon-customdata-v2': 'eyJkYXRhIjoibWJLV1NjSUNIU25WMjZQWFB4cGlDQUJVbnZsOGxCOWRNZDhHZ3dhbjZqRDFwNFZoQk51VlhQY2RMaG9nNTNYbngyTjFaalwvQ3BxZ3RUS2k5Rzd3MUZ3PT0iLCJzaXRlX2lkIjoiREVNTyIsImRybV90eXBlIjoiUGxheVJlYWR5In0='
}
}
};
player.source = {
"sources": {
"src": "<HLS_STREAM_URL>",
"type": "application/x-mpegurl",
"contentProtection": drmConfiguration
}
}
} else if (DASH) {
const drmConfiguration = {
"playready": {
"licenseAcquisitionURL": "<LICENSE_KEY_URL_PLAYREADY>",
"headers": {
"<CUSTOM_HEADER_NAME>" : "<CUSTOM_HEADER_VALUE>"
}
},
"widevine": {
"licenseAcquisitionURL": "<LICENSE_KEY_URL_WIDEVINE>",
"headers": {
"<CUSTOM_HEADER_NAME>" : "<CUSTOM_HEADER_VALUE>"
}
}
};
player.source = {
"sources": {
"src": "<DASH_STREAM_URL>",
"type": "application/dash+xml",
"contentProtection": drmConfiguration
}
}
}"
Resources
- https://doverunner.com/docs/content-security/multi-drm/
- https://doverunner.com/docs/content-security/multi-drm/clients/html5-player/