Constructor
new FairPlayUtils()
A set of FairPlay utility functions.
- Source:
Methods
basicInitDataTransform_(initDatanon-null, initDataType, drmInfonullable)
    Basic initDataTransform configuration.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| initData | Uint8Array | ||
| initDataType | string | ||
| drmInfo | shaka.extern.DrmInfo | <nullable> | 
- Source:
commonFairPlayResponse(type, response, contextopt)
    Common FairPlay response transform for some DRMs providers.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | shaka.net.NetworkingEngine.RequestType | ||
| response | shaka.extern.Response | ||
| context | shaka.extern.RequestContext | <optional> | 
- Source:
conaxFairPlayRequest(type, request, contextopt)
    Conax FairPlay request.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | shaka.net.NetworkingEngine.RequestType | ||
| request | shaka.extern.Request | ||
| context | shaka.extern.RequestContext | <optional> | 
- 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
expressplayFairPlayRequest(type, request, contextopt)
    ExpressPlay FairPlay request.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | shaka.net.NetworkingEngine.RequestType | ||
| request | shaka.extern.Request | ||
| context | shaka.extern.RequestContext | <optional> | 
- Source:
expressplayInitDataTransform(initDatanon-null, initDataType, drmInfonullable)
    ExpressPlay initDataTransform configuration.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| initData | Uint8Array | ||
| initDataType | string | ||
| drmInfo | shaka.extern.DrmInfo | <nullable> | 
- Source:
ezdrmFairPlayRequest(type, request, contextopt)
    EZDRM FairPlay request.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | shaka.net.NetworkingEngine.RequestType | ||
| request | shaka.extern.Request | ||
| context | shaka.extern.RequestContext | <optional> | 
- 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>
octetStreamFairPlayRequest_(type, request, contextopt)
    Set content-type to application/octet-stream in a FairPlay request.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | shaka.net.NetworkingEngine.RequestType | ||
| request | shaka.extern.Request | ||
| context | shaka.extern.RequestContext | <optional> | 
- Source:
verimatrixFairPlayRequest(type, request, contextopt)
    Verimatrix FairPlay request.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | shaka.net.NetworkingEngine.RequestType | ||
| request | shaka.extern.Request | ||
| context | shaka.extern.RequestContext | <optional> | 
- Source:
verimatrixInitDataTransform(initDatanon-null, initDataType, drmInfonullable)
    Verimatrix initDataTransform configuration.
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| initData | Uint8Array | ||
| initDataType | string | ||
| drmInfo | shaka.extern.DrmInfo | <nullable> | 
- Source: