Header-based DRM **************** Code samples: * Custom license server (https://raw.githubusercontent.com/castlabs/prestoplay-web-code-samples/refs/heads/main/examples/drm/header_drm.js): 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 | |=========================================|===================================|==========================================================================================| | "widevineLicenseUrl" | Yes | The Widevine license URL. | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "playReadyLicenseUrl" | Yes | The PlayReady license URL. | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "fairPlayLicenseUrl" | Yes | The FairPlay license URL. | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "fairPlayCertificateUrl" | Yes | The FairPlay certificate URL. | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "fairPlayContentIdStrategy" | No | The FairPlay content ID | | | | extraction strategy. Default: | | | | "FULL_SKD". | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "headers" | No | A dictionary of custom request | | | | headers. | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "widevineVideoRobustness" | No | Widevine video robustness levels. | | | | Default: "[SW_SECURE_DECODE, | | | | undefined]". See | | | | "drm.WidevineRobustnessLevel" | | | | (https://players.castlabs.com/web/latest/docs/api/clpp.drm.WidevineRobustnessLevel.md). | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "widevineAudioRobustness" | No | Widevine audio robustness levels. | | | | Default: "[SW_SECURE_CRYPTO, | | | | undefined]". See | | | | "drm.WidevineRobustnessLevel" | | | | (https://players.castlabs.com/web/latest/docs/api/clpp.drm.WidevineRobustnessLevel.md). | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "widevineDistinctiveIdentifierRequired" | No | Whether a persistent distinctive | | | | identifier is required. Default: | | | | "false". | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "widevinePersistentStateRequired" | No | Whether the ability to persist | | | | state is required. Default: | | | | "false". | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "playReadyVideoRobustness" | No | PlayReady video robustness | | | | levels. Default: "[SL3000]". See | | | | "drm.PlayreadyRobustnessLevel" | | | | (https://players.castlabs.com/web/latest/docs/api/clpp.drm.PlayreadyRobustnessLevel.md). | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "playReadyAudioRobustness" | No | PlayReady audio robustness | | | | levels. Default: "[SL2000]". See | | | | "drm.PlayreadyRobustnessLevel" | | | | (https://players.castlabs.com/web/latest/docs/api/clpp.drm.PlayreadyRobustnessLevel.md). | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+ | "serverCertificate" | No | No server certificate is selected | | | | by default. Provide the Widevine | | | | server certificate ahead of time | | | | as a "Uint8Array". | +-----------------------------------------+-----------------------------------+------------------------------------------------------------------------------------------+