Class: shaka.util.FairPlayUtils

A set of FairPlay utility functions.

Constructor

(export) new FairPlayUtils()

A set of FairPlay utility functions.

Source:

Methods

(export, static) defaultGetContentId(initDatanon-null) → {string}

Using the default method, extract a content ID from the init data. This is based on the FairPlay example documentation.
Parameters:
Name Type Description
initData BufferSource
Source:
Returns:
Type
string

(export, static) initDataTransform(initDatanon-null, contentId, certnullable) → (non-null) {Uint8Array}

Transforms the init data buffer using the given data. The format is:
[4 bytes] initDataSize
[initDataSize bytes] initData
[4 bytes] contentIdSize
[contentIdSize bytes] contentId
[4 bytes] certSize
[certSize bytes] cert
Parameters:
Name Type Attributes Description
initData BufferSource
contentId BufferSource | string
cert BufferSource <nullable>
The server certificate; this will throw if not provided.
Source:
Returns:
Type
Uint8Array