Class: SessionRequest

  • chrome.cast.SessionRequest is used to initiate or join a Google Cast session with a receiver application.

  • It requires the receiver application ID (appId) and optionally accepts capabilities, timeout, Android receiver compatibility, and credentials data.

  • Key properties include appId, capabilities, credentialsData, and androidReceiverCompatible for configuring the session request.

  • It allows specifying the required capabilities of the receiver device and credentials for sender identification.

  • Developers can set a timeout for the session request and indicate Android receiver compatibility.

Constructor

SessionRequest

new SessionRequest(appId, capabilities, timeout, androidReceiverCompatible, credentialsData)

Parameter

appId

string

The receiver application id.

capabilities

Optional

Array of non-null chrome.cast.Capability

Required capabilities for the receiver.

Value must not be null.

timeout

Optional

number

Optional timeout for requesting a session for this application.

androidReceiverCompatible

Optional

boolean

Indicates if the app is compatible with an Android Receiver.

credentialsData

Optional

chrome.cast.CredentialsData

Credentials data used to identify the credentials of the sender.

Value may be null.

Properties

androidReceiverCompatible

boolean

Indicates if the app is compatible with an Android Receiver.

appId

string

The receiver application id.

capabilities

non-null Array of non-null chrome.cast.Capability

Capabilities required of the receiver device.

credentialsData

nullable chrome.cast.CredentialsData

Credentials data used to identify the credentials of the sender.

language

nullable string

Optional language to add to the Accept-Language header value when launching the receiver application. Ignored if joining an already existing session. The value is represented as '-' tag as per RFC 5646. For example 'es-ES'.

requestSessionTimeout

number

The timeout used for requesting a session for the application in milliseconds. Defaults to the value of chrome.cast.timeout.requestSession.