Header-based DRM¶
Code samples
Custom license server: the header-based DRM environment with a license server that authorizes requests with HTTP headers.
Integrate a custom DRM service with the configurable header-based DRM environment, available from the core module. Pass backend URLs and custom request headers, such as the authentication header:
player.open({
drm: {
env: 'HeaderDrm',
customData: {
widevineLicenseUrl: '...',
widevineVideoRobustness: [
clpp.drm.WidevineRobustnessLevel.SW_SECURE_DECODE,
undefined
],
widevineAudioRobustness: [
clpp.drm.WidevineRobustnessLevel.SW_SECURE_CRYPTO,
undefined
],
playReadyLicenseUrl: '...',
playReadyVideoRobustness: [
clpp.drm.PlayreadyRobustnessLevel.SL3000
],
playReadyAudioRobustness: [
clpp.drm.PlayreadyRobustnessLevel.SL2000
],
fairPlayLicenseUrl: '...',
fairPlayCertificateUrl: '...',
fairPlayContentIdStrategy:
clpp.drm.HeaderDrm.ContentIdStrategy.FULL_SKD,
serverCertificate: new Uint8Array(...),
headers: {
'my-auth-header': '...'
}
}
}
});
Specific properties of the header-based DRM environment, set under
drm.customData:
Property |
Required |
Description |
|---|---|---|
|
Yes |
The Widevine license URL. |
|
Yes |
The PlayReady license URL. |
|
Yes |
The FairPlay license URL. |
|
Yes |
The FairPlay certificate URL. |
|
No |
The FairPlay content ID extraction strategy. Default: |
|
No |
A dictionary of custom request headers. |
|
No |
Widevine video robustness levels. Default: |
|
No |
Widevine audio robustness levels. Default: |
|
No |
Whether a persistent distinctive identifier is required. Default: |
|
No |
Whether the ability to persist state is required. Default: |
|
No |
PlayReady video robustness levels. Default: |
|
No |
PlayReady audio robustness levels. Default: |
|
No |
No server certificate is selected by default. Provide the Widevine server certificate ahead of time as a |