Class: shaka.util.FairPlayUtils

A set of FairPlay utility functions.

Constructor

new FairPlayUtils()

A set of FairPlay utility functions.

Source:

Methods

commonFairPlayResponse(type, response)

Common FairPlay response transform for some DRMs providers.
Parameters:
Name Type Description
type shaka.net.NetworkingEngine.RequestType
response shaka.extern.Response
Source:

conaxFairPlayRequest(type, request)

Conax FairPlay request.
Parameters:
Name Type Description
type shaka.net.NetworkingEngine.RequestType
request shaka.extern.Request
Source:

conaxInitDataTransform(initDatanon-null, initDataType, drmInfonullable)

Conax initDataTransform configuration.
Parameters:
Name Type Attributes Description
initData Uint8Array
initDataType string
drmInfo shaka.extern.DrmInfo <nullable>
Source:

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

ezdrmFairPlayRequest(type, request)

EZDRM FairPlay request.
Parameters:
Name Type Description
type shaka.net.NetworkingEngine.RequestType
request shaka.extern.Request
Source:

ezdrmInitDataTransform(initDatanon-null, initDataType, drmInfonullable)

EZDRM initDataTransform configuration.
Parameters:
Name Type Attributes Description
initData Uint8Array
initDataType string
drmInfo shaka.extern.DrmInfo <nullable>
Source:

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

isFairPlaySupported() → {Promise.<boolean>}

Check if FairPlay is supported.
Source:
Returns:
Type
Promise.<boolean>

verimatrixFairPlayRequest(type, request)

Verimatrix FairPlay request.
Parameters:
Name Type Description
type shaka.net.NetworkingEngine.RequestType
request shaka.extern.Request
Source:

verimatrixInitDataTransform(initDatanon-null, initDataType, drmInfonullable)

Verimatrix initDataTransform configuration.
Parameters:
Name Type Attributes Description
initData Uint8Array
initDataType string
drmInfo shaka.extern.DrmInfo <nullable>
Source: