Playing protected content with Irdeto
Overview
If you are not sure what DRM is, you want have an overview and get started, please have a look at our DRM Setup Guide.
Nearly every license provider, such as Verimatrix or Irdeto, requires a few special information being sent to the DRM license server, or responds with a proprietary format. Instead of integrating a few license providers into the core of our player, we decided to provide necessary configuration options via the player configuration.
Widevine
var conf = {
key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
source: {
dash: 'DASH_MANIFEST_URL',
drm: {
widevine: {
LA_URL: 'WIDEVINE_LA_URL',
headers: {
privateData: 'cookie=VUID'
},
}
}
}
};
Please replace the following placeholders in the code:
- DASH_MANIFEST_URL: The MPEG-DASH manifest (MPD) URL.
- WIDEVINE_LA_URL: The Widevine license server URL.
- VUID: The VUID data to send to the DRM server to authenticate.
Playready
var conf = {
key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
source: {
dash: 'DASH_MANIFEST_URL',
drm: {
playready: {
LA_URL: 'PLAYREADY_LA_URL',
headers: {
privateData: 'cookie=PRIVATE_DRM_DATA', // Assumption as of now!
},
}
}
}
};
Please replace the following placeholders in the code:
- DASH_MANIFEST_URL: The MPEG-DASH manifest (MPD) URL.
- PLAYREADY_LA_URL: The PlayReady license server URL.
- PRIVATE_DRM_DATA: The private data to send to the DRM server to authenticate. Also known as VUID.
Fairplay
// Still needs to be updated!
var conf = {
key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
source: {
hls: 'HLS_MANIFEST_URL',
drm: {
fairplay: {
certificateURL: 'CERTIFICATE_URL',
LA_URL: 'FPS_LA_URL',
prepareContentId: function (contentId) {
return contentId.match(/ContentId=([^&]+)/)[1];
},
prepareMessage: function (event, session) {
return new Uint8Array(event.message);
},
prepareLicense: function (license) {
return new Uint8Array(license);
},
licenseResponseType: 'arraybuffer'
}
}
}
};
Please replace the following placeholders in the code:
- HLS_MANIFEST_URL: The URL to the HLS manifest (M3U8) file.
- FPS_LA_URL: The FairPlay license server URL.
- CERTIFICATE_URL: The URL to the Fairplay certificate. This needs to be accessible for the player.
Complete Player Configuration Example for Multi-DRM
// Needs to be updated once we have all the DRMs figured out
var conf = {
key: 'YOUR-PLAYER-LICENSE-KEY-HERE',
source: {
dash: 'DASH_MANIFEST_URL',
hls: 'HLS_MANIFEST_URL',
drm: {
widevine: {
LA_URL: 'WIDEVINE_LA_URL'
},
playready: {
LA_URL: 'PLAYREADY_LA_URL'
},
fairplay: {
certificateURL: 'FPS_CERTIFICATE_URL',
LA_URL: 'FPS_LA_URL',
prepareContentId: function (contentId) {
return contentId.match(/ContentId=([^&]+)/)[1];
},
prepareMessage: function (event, session) {
return new Uint8Array(event.message);
},
prepareLicense: function (license) {
return new Uint8Array(license);
},
licenseResponseType: 'arraybuffer'
}
}
}
};
Please replace the following placeholders in the code:
- DASH_MANIFEST_URL: The MPEG-DASH manifest (MPD) URL.
- HLS_MANIFEST_URL: The URL to the HLS manifest (M3U8) file.
- WV_LA_URL: The Widevine license server URL.
- PR_LA_URL: The PlayReady license server URL.
- FPS_LA_URL: The FairPlay license server URL.
- FPS_CERTIFICATE_URL: The URL to the Fairplay certificate. This needs to be accessible for the player.
Updated 2 months ago