メインコンテンツまでスキップ

DRM

To play DRM-protected videos, please specify license server URLs and options with DRM.

BlendVision One drmUrl can be found on here, and playbackToken is the same token to start a playback session

const drmHeaders: {
'x-custom-data': `token_type=upfront&token_value=${playbackToken}`,
} // Caution: not resource token, it is valid for 24 hours

const player = createPlayer('player-container', {
license, // license is not required when testing in local development environment
source: [
{
type: 'application/dash+xml',
src: dashUrl,
drm: {
widevine: {
licenseUri: drmUrl,
headers: drmHeaders,
},
playready: {
licenseUri: drmUrl,
headers: drmHeaders,
},
},
},
{
type: 'application/x-mpegurl',
src: hlsUrl,
drm: {
fairplay: {
licenseUri: drmUrl,
certificateUri: `${drmLicensePortalUrl}/fairplay_cert`,
headers: drmHeaders,
},
}
}
],
})