Interface MKClearKeyDRMServerConfig

ClearKey DRM server configuration.

Example:

clearkey: {
LA_URL: "https://drm-clearkey.net/AcquireLicense",
headers: {
"Content-Type": "application/json"
}
}

Hierarchy

  • MKClearKeyDRMServerConfig

Properties

LA_URL: string

A URL to the ClearKey license server for this content.

For ClearKey HLS_AES, the player picks the license url from the media playlist directly so no LA_URL is required. However if for this license request you have to pass an authorization token or any other custom headers then you must to set LA_URL as "HLS_AES" and then pass in headers with this config as in the Example shown below.

Example:

const sourceConfig = {
hls: "HLS Source manifest URL with HLS_AES",
drm: {
clearkey: {
LA_URL: "HLS_AES",
headers: {
"Authorization": "Bearer=eyJhbGciOiJIUzI1NiIsInR5cJ9.eyJpc3MiOiJNeWlzcyIsImF1YXVkIiwiaWF0IjoxNTE2MjM5MDIyfQ.J7BLJFOgUvsHzvwoJ_hzLtgm5EU2hNtirqGCzRGHajU"
}
}
}
}
headers?: MKHeaders

An object which specifies custom HTTP headers.

DRMtoday by castLabs Specific Example:

headers : {
'dt-custom-data': 'INSERT-YOUR-BASE64-ENCODED-CUSTOMDATA'
}
licenseRequestRetryDelay?: number

Specifies how long in milliseconds should be waited before a license request should be retried.

maxLicenseRequestRetries?: number

Specifies how often a license request should be retried if it was not successful (e.g. the license server was not reachable). Default is 1. 0 disables retries.

withCredentials?: boolean

Set to true to send credentials such as cookies or authorization headers along with the license requests. Default is false.