Constructor

RequestInfo

new RequestInfo()

Properties

content

nullable Uint8Array

The content of the request. Can be used to modify license request body.

headers

Object

An object containing properties that you would like to send in the header.

protectionSystem

nullable cast.player.api.ContentProtection

If the request information is for a license, this field will be the name of the content protection system used.

setResponse

nullable function((string, ArrayBuffer, or null), optional number)

If skipRequest field is set to true, the request will not be sent over the network. The application is supposed to call this function to provide the response data when skipRequest is set to true as the library will not have made the request. Pass null if the network request failed. This functionality can be used to cache key requests and return them during playback without making a network connection or for dynamically creating a live manifest, returning it to the library and bypassing a network request. Usage: setResponse(responseData, opt_responseTime) Where responseData contains the response to the network request and opt_responseTime contains an optional time for how long the network request took in milliseconds. The passed in response time may be used for network bandwidth calculations.

skipRequest

boolean

Whether the player should skip making the request and instead wait until setResponse to be called. This allows applications to make their own request or avoid a network request altogether by providing the expected response to setResponse.

timeoutInterval

number

The timeout in milliseconds for the request.

url

nullable string

The URL that will be accessed.

withCredentials

boolean

Indicates whether CORS Access-Control requests should be made using credentials such as cookies or authorization headers.