Class: shaka.util.Pssh

Parse a PSSH box and extract the system IDs.

Constructor

new Pssh(psshBoxnon-null)

Parse a PSSH box and extract the system IDs.

Parameters:
Name Type Description
psshBox Uint8Array
Source:

Members

cencKeyIds :Array.<string>

In hex.
Type:
  • Array.<string>
Source:

data :Array.<!Uint8Array>

Array with the pssh boxes found.
Type:
  • Array.<!Uint8Array>
Source:

systemIds :Array.<string>

In hex.
Type:
  • Array.<string>
Source:

Methods

createPssh(datanon-null, systemIdnon-null, keyIdsnon-null, version) → {Uint8Array}

Creates a pssh blob from the given system ID, data, keyIds and version.
Parameters:
Name Type Description
data Uint8Array
systemId Uint8Array
keyIds Set.<string>
version number
Source:
Returns:
Type
Uint8Array

normaliseInitData(initDatanon-null) → {Uint8Array}

Normalise the initData array. This is to apply browser specific work-arounds, e.g. removing duplicates which appears to occur intermittently when the native msneedkey event fires (i.e. event.initData contains dupes).
Parameters:
Name Type Description
initData Uint8Array
Source:
Returns:
Type
Uint8Array

parsePsshBox_(boxnon-null)

Parameters:
Name Type Description
box shaka.extern.ParsedBox
Source: