Class: shaka.util.FairPlayUtils

A set of FairPlay utility functions.

Constructor

new FairPlayUtils()

A set of FairPlay utility functions.

Source:

Methods

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

initDataTransform(initDatanon-null, contentId, certnullable) → {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