Function: parsePsshList()
Call Signature
function parsePsshList(data): Record<string, ArrayBufferLike>;Defined in: cenc/parsePsshList.ts:23
Parses a list of PSSH boxes into keysystem-specific PSSH data.
The function stops before a box if the data ends inside the header or the body of that box. The function also stops before a box with a size below the size of its header. The function then returns the entries before that box and does not throw. The function skips a pssh box that ends before its data size field.
Parameters
data
ArrayBufferLike
The concatenated list of PSSH boxes as provided by the CDM as initialization data when CommonEncryption content is detected
Returns
Record<string, ArrayBufferLike>
An object that has a property named according to each of the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000) and a ArrayBuffer (the entire PSSH box) as the property value
Example
const initData = new Uint8Array(samplePsshBox).buffer
const result = parsePsshList(initData)Call Signature
function parsePsshList(data): Record<string, Uint8Array>;Defined in: cenc/parsePsshList.ts:39
Parses a list of PSSH boxes into keysystem-specific PSSH data.
The function stops before a box if the data ends inside the header or the body of that box. The function also stops before a box with a size below the size of its header. The function then returns the entries before that box and does not throw. The function skips a pssh box that ends before its data size field.
Parameters
data
The concatenated list of PSSH boxes as a Uint8Array.
Returns
Record<string, Uint8Array>
An object that has a property named according to each of the detected key system UUIDs and a Uint8Array (the entire PSSH box) as the property value