Function: getPsshForKeySystem()
ts
function getPsshForKeySystem(uuid, initData): ArrayBufferLike | null;Defined in: cenc/getPsshForKeySystem.ts:16
Returns the PSSH box associated with the given key system from the concatenated list of PSSH boxes in the provided initData.
Parameters
uuid
string
The desired key system UUID
initData
ArrayBufferLike
'cenc' initialization data. Concatenated list of PSSH boxes.
Returns
ArrayBufferLike | null
The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.
Example
ts
const initData = new Uint8Array(samplePsshBox).buffer
const result = getPsshForKeySystem(uuid, initData)