DRM Pre-Integration API

THEOplayer pre-integrates with the best-of-class DRM providers. Setting the integration attribute on your DRMConfiguration allows you to quickly set up an integration with one of our DRM partners of your choice. Depending on your preferred vendor from the list below, the integration attribute should have a specific value.

KeyOS

KeyOSDRMConfiguration

Setting a DRMConfiguration's integration flag to 'keyos' makes it a KeyOSDRMConfiguration. This interface is an extension of the regular DRMConfiguration but has the following extra and extended attributes:

Method Type Optional Description
customdata string no/yes This attribute is required if it is not specified in the separate KeyOSLicenseAcquisitionDescriptions for Widevine and Playready. Otherwise it is optional.
The value of this attribute should be the value of the customData header that you want to send with license requests to the KeyOS license server. In most cases this will be the base64 encoded KeyOS authentication XML.
integration string no The value should be 'keyos'.
playready KeyOSLicenseAcquisitionDescription yes An optional KeyOSLicenseAcquisitionDescription for Playready.
widevine KeyOSLicenseAcquisitionDescription yes An optional KeyOSLicenseAcquisitionDescription for Widevine.

KeyOSLicenseAcquisitionDescription

KeyOSLicenseAcquisitionDescription is an extension of a regular LicenseAcquisitionDescription. Similar to a regular LicenseAcquisitionDescription it allows you to specify attributes like the licenseAcquisitionURL, headers, queryParameters, ... that should be used specifically for requests to the license servers for the intended DRM scheme (e.g. Widevine or Playready). It has the following extra and extended attributes:

Method Type Optional Description
customdata string no/yes This attribute is required if it is not specified on the parent KeyOSDRMDescription. Otherwise it is optional.
The value of this attribute should be the value of the customData header that you want to send with license requests to the KeyOS license server for a specific DRM scheme. In most cases this will be the base64 encoded KeyOS authentication XML.
licenseAcquisitionURL string yes If provided, the player will send license requests for the intended DRM scheme to the provided licenseAcquisitionURL. If not provided, the player will use the default license acquisition URLs for the KeyOS Playready and Widevine servers.

Examples

Basic Integration

To set up a basic integration with your KeyOS account. You would do the following:

var keyOSDRMConfiguration = { 
    integration : 'keyos',
    customdata : 'PEtleU9T...blhNTD4='
}

/* Set the player's source by providing your manifest URL and the keyOSDRMConfiguration as DRMConfiguration for that source.*/
player.source = {
    sources : {
        src : 'your.mpd',
        type : 'application/dash+xml',
        drm : keyOSDRMConfiguration
    }
}

 

Advanced Integration

When debugging, you can also use our API to set a custom license URL or customData for Playready and/or Widevine. The following example creates a keyOSDRMConfiguration with a custom setup for Playready, but which uses the defaults for Widevine:

var keyOSDRMConfiguration = { 
    integration : 'keyos',
    customdata : 'PEtleU9T...blhNTD4=',
    playready : {
        licenseAcquisitionURL : 'customplayready.url',
        customdata : 'CUSTOM...='
    }
}