Interface LicenseRequest

A request for a license.

interface LicenseRequest {
    body: null | Uint8Array;
    fairplaySkdUrl: undefined | string;
    headers: {
        [headerName: string]: string;
    };
    method: string;
    url: string;
    useCredentials: boolean;
}

Hierarchy (view full)

Properties

body: null | Uint8Array

The body of the certificate request.

Remarks


- For GET requests (such as with Fairplay), the body will be empty (null).
- For POST requests (such as with Widevine): the body will contain the two bytes in an array as specified in the certificate request protocol.

fairplaySkdUrl: undefined | string

The SKD URL (for example skd://fb64ba7c5bd34bf188cf9ba76ab8370e) as extracted from the #EXT-X-KEY tag in the HLS playlist.

Remarks


- Only available for Fairplay license requests. The value will be undefined otherwise.

headers: {
    [headerName: string]: string;
}

The HTTP request headers to be sent to the server.

Type declaration

  • [headerName: string]: string
method: string

The method of the HTTP request, for example: GET, POST or PUT.

Remarks


- Will be equal to GET for Fairplay certificate requests and POST for Widevine certificate requests.
- Will be equal to POST for all license requests.

url: string

The URL for the certificate server. By default, this will equal the certificate URL configured in the {@link KeySystemConfiguration}.

useCredentials: boolean

Whether the player is allowed to use credentials for cross-origin requests.