Media protection key system functionality that can be modified/overridden by applications
Methods
-
getKeySystemBySystemString(systemString)
-
Returns the key system associated with the given key system string name (i.e. 'org.w3.clearkey')
Parameters:
Name Type Description systemString
string the system string
Returns:
the key system or null if no supported key system is associated with the given key system string
- Type
- KeySystem | null
-
getKeySystems()
-
Returns a prioritized list of key systems supported by this player (not necessarily those supported by the user agent)
Returns:
a prioritized list of key systems
- Type
- Array.<KeySystem>
-
getLicenseServer(keySystem, protData [, messageType])
-
Returns the license server implementation data that should be used for this request.
Parameters:
Name Type Argument Default Description keySystem
KeySystem the key system associated with this license request
protData
ProtectionData protection data to use for the request
messageType
string <optional>
"license-request" the message type associated with this request. Supported message types can be found here.
Returns:
the license server implementation that should be used for this request or null if the player should not pass messages of the given type to a license server
- Type
- LicenseServer | null
-
getSupportedKeySystems(initData, protDataSet)
-
Returns key systems supported by this player for the given PSSH initializationData. Only key systems supported by this player that have protection data present will be returned. Key systems are returned in priority order (highest priority first)
Parameters:
Name Type Description initData
ArrayBuffer Concatenated PSSH data for all DRMs supported by the content
protDataSet
ProtectionData user specified protection data - license server url etc supported by the content
Returns:
array of objects indicating which supported key systems were found. Empty array is returned if no supported key systems were found
- Type
- Array.<Object>
-
getSupportedKeySystemsFromContentProtection(cps)
-
Returns a set of supported key systems and CENC initialization data from the given array of ContentProtection elements. Only key systems that are supported by this player will be returned. Key systems are returned in priority order (highest first).
Parameters:
Name Type Description cps
Array.<Object> array of content protection elements parsed from the manifest
Returns:
array of objects indicating which supported key systems were found. Empty array is returned if no supported key systems were found
- Type
- Array.<Object>
-
initDataEquals(initData1, initData2)
-
Check equality of initData array buffers.
Parameters:
Name Type Description initData1
ArrayBuffer first initData
initData2
ArrayBuffer second initData
Returns:
true if the initData arrays are equal in size and contents, false otherwise
- Type
- boolean
-
isClearKey(keySystem)
-
Determines whether the given key system is ClearKey. This is necessary because the EME spec defines ClearKey and its method for providing keys to the key session; and this method has changed between the various API versions. Our EME-specific ProtectionModels must know if the system is ClearKey so that it can format the keys according to the particular spec version.
Parameters:
Name Type Description keySystem
Object the key
Returns:
true if this is the ClearKey key system, false otherwise
- Type
- boolean
-
processClearKeyLicenseRequest(protData, message)
-
Allows application-specific retrieval of ClearKey keys.
Parameters:
Name Type Description protData
ProtectionData protection data to use for the request
message
ArrayBuffer the key message from the CDM
Returns:
the clear keys associated with the request or null if no keys can be returned by this function
- Type
- ClearKeyKeySet | null