Class: shaka.util.Pssh

Constructor

new Pssh(psshBoxnon-null)

Parse a PSSH box and extract the system IDs.
Parameters:
Name Type Description
psshBox Uint8Array
Source:
Throws:
if a PSSH box is truncated or contains a size field over 53 bits.
Type
shaka.util.Error

Members

(non-null) cencKeyIds :Array.<string>

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

(non-null) data :Array.<!Uint8Array>

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

(non-null) systemIds :Array.<string>

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

Methods

(static) createPssh(datanon-null, systemIdnon-null) → (non-null) {Uint8Array}

Creates a pssh blob from the given system ID and data.
Parameters:
Name Type Description
data Uint8Array
systemId Uint8Array
Source:
Returns:
Type
Uint8Array

(static) normaliseInitData(initDatanon-null) → (non-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

(private) parsePsshBox_(boxnon-null)

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