Interface MKWidevineModularDrmConfig

Widevine Modular DRM configuration.

Hierarchy

  • MKWidevineModularDrmConfig

Properties

LA_URL?: string

An URL to the Widevine license server for this content.

Can be defined in the configuration or taken out from the video manifest if defined there.

If the config URL is defined it has precedence over the URL defined in the manifest.

audioRobustness?: string

Sets the robustness level for audio.

The robustness specifies the security level of the DRM key system.

If a string specifies a higher security level than the system is capable of supporting, playback will fail.

The lowest security level is an empty string.

The strings specific to key system and currently supported values for Widevine are:

  • HW_SECURE_ALL
  • HW_SECURE_DECODE
  • HW_SECURE_CRYPTO
  • SW_SECURE_DECODE
  • SW_SECURE_CRYPTO
headers?: MKHeaders

An object specifying custom HTTP headers.

licenseRequestRetryDelay?: number

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

maxLicenseRequestRetries?: number

Specifies how often a license request should be retried if it was not successful.

Default is 1 and setting a value 0 will disable retries.

prepareLicense?: ((licenseObject) => any)

Type declaration

    • (licenseObject): any
    • A function which gets the widevine license from the server.

      This is needed for custom widevine servers where the response from the server may have the license wrapped in an JSON object.

      The user can implement this function to extract the licnese from the response using custom implementation and return the license.

      Parameters

      • licenseObject: any

      Returns any

prepareMessage?: ((keyMessage) => any)

Type declaration

    • (keyMessage): any
    • A function to prepare the license acquisition message which will be sent to the license acquisition server.

      As many DRM providers expect different, vendor-specific message, this can be done using this user-implemented function.

      The parameter is the key message event object as given by the Widevine CDM.

      Parameters

      • keyMessage: any

      Returns any

serverCertificate?: ArrayBuffer

A server certificate to be used to encrypt messages to the DRM license server.

The contents are Key System specific data. It allows an application to proactively provide a server certificate to implementations that support it to avoid the additional round-trip should the CDM request it.

This is intended as an optimization and applications are not required to use it. If not set but required by the CDM, the CDM will request a certificate from the DRM license server.

videoRobustness?: string

Sets the robustness level for video.

The robustness specifies the security level of the DRM key system.

If a string specifies a higher security level than the system is capable of supporting, playback will fail.

The lowest security level is an empty string. The strings specific to the key system that are supported fro Widevine are:

  • HW_SECURE_ALL
  • HW_SECURE_DECODE
  • HW_SECURE_CRYPTO
  • SW_SECURE_DECODE
  • SW_SECURE_CRYPTO
withCredentials?: boolean

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

Default is false.