Interface: KeySystem

KeySystem

Defines the public interface for all Key Systems (DRMs) supported by the player.

Source:

Members


<readonly> schemeIdURI :String

The scheme ID URI for this key system in the form 'urn:uuid:01234567-89ab-cdef-0123-456789abcdef' as used in DASH ContentProtection elements

Type:
  • String
Source:

<readonly> systemString :String

Key system name string (e.g. 'org.w3.clearkey')

Type:
  • String
Source:

<readonly> uuid :String

Key system UUID in the form '01234567-89ab-cdef-0123-456789abcdef'

Type:
  • String
Source:

Methods


getInitData(contentProtection)

Parse DRM-specific init data from the ContentProtection element.

Parameters:
Name Type Description
contentProtection Object

the json-style contentProtection object representing the ContentProtection element parsed from the MPD XML document.

Source:
Returns:

EME initialization data

Type
ArrayBuffer

getLicenseRequestFromMessage(message)

For some key systems, the CDM message contains more than just the license request data. This method will pull the license request from the CDM message, if necessary.

Parameters:
Name Type Description
message ArrayBuffer

the CDM message

Source:
Returns:

the license request message as will be passed to XMLHttpRequest.send()

Type
Uint8Array

getLicenseServerURLFromInitData(initData)

Returns a license server URL as parsed from key system initialization data (PSSH).

Parameters:
Name Type Description
initData ArrayBuffer

the initialization data. This is just the "Data" field from the PSSH box definition

Source:
Returns:

The license server URL or null if URL is not available in initData

Type
string

getRequestHeadersFromMessage(message)

For some key systems, the CDM message contains HTTP headers that can be parsed by the application and attached to the license request. Returns a header object with key/value pairs as object properties/values

Parameters:
Name Type Description
message ArrayBuffer

the CDM message

Source:
Returns:

headers object with header names as the object property names and header values as the corresponding object property values. Return null if no such headers were found or if the mechanism is not supported by this key system

Type
Object