Classes

Enumerations

DeviceCapabilities

static

string

Device capabilities.

Value

AUDIO_ASSISTANT

Assistant support, that is, the devices have a microphone and respond to 'Ok Google' and voice commands.

BLUETOOTH_SUPPORTED

Bluetooth support.

DISPLAY_SUPPORTED

Display output support. For example, Chromecast and Cast TVs have display support, Chromecast Audio and Google Home have not.

HI_RES_AUDIO_SUPPORTED

Hi-res audio (up to 24-bit / 96KHz) support.

IS_DV_SUPPORTED

Dolby Vision support of the current setup (that is, Chromecast and the TV it is connected to).

IS_HDR_SUPPORTED

HDR video support of the current setup (that is, Chromecast and the TV it is connected to).

TOUCH_INPUT_SUPPORTED

Touch input support, that is, the devices have a touchable display (e.g. Google Smart Display).

DisconnectReason

static

string

Represents the disconnect reason.

Value

REQUESTED_BY_SENDER

Connection close was actively requested by the sender application (usually triggered by the user).

ERROR

There was a protocol error.

UNKNOWN

It is unknown if the sender requested to disconnect gracefully calling close (most likely it didn't, but the close message could have been lost). This normally happens when there is a network timeout or if the sender application crashes or if the sender OS closes the socket.

EventType

static

string

System events dispatched by cast.receiver.CastReceiverManager.

Value

READY

Fired when the system is ready.

SHUTDOWN

Fired when the application is terminated.

SENDER_CONNECTED

Fired when a new sender has connected.

SENDER_DISCONNECTED

Fired when a sender has disconnected.

ERROR

Fired when there is a system error.

SYSTEM_VOLUME_CHANGED

Fired when the system volume has changed.

VISIBILITY_CHANGED

Fired when the visibility of the application has changed (for example after a HDMI Input change or when the TV is turned off/on and the cast device is externally powered). Note that this API has the same effect as the webkitvisibilitychange event raised by your document, we provided it as CastReceiverManager API for convenience and to avoid a dependency on a webkit-prefixed event.

STANDBY_CHANGED

Fired when the standby state of the TV has changed. This event is related to the visibility chnaged event, as if the TV is in standby the visibility will be false, the visibility is more granular (as it also detects that the TV has selected a different channel) but it is not reliably detected in all TVs, standby can be used in those cases as most TVs implement it.

MAX_VIDEO_RESOLUTION_CHANGED

FEEDBACK_STARTED

Fired when system starts to create feedback report.

MessageType

static

string

Types of custom messages.

Value

STRING

Messages are free-form strings. The application is responsible for encoding/decoding the information transmitted.

JSON

Messages are JSON-encoded. The underlying transport will use a JSON encoded string.

StandbyState

static

string

Represents the current standby state reported by the platform. It may be UNKNOWN if the cast platform was unable to determine the state yet.

Value

STANDBY

NOT_STANDBY

UNKNOWN

SystemState

static

string

Represents the current system state.

Value

NOT_STARTED

The application has not been requested to start yet.

STARTING_IN_BACKGROUND

Application is starting but it is in background.

STARTING

Application is starting.

READY

Application is ready to send and receive messages and it is in foreground.

STOPPING_IN_BACKGROUND

Application is stopping but it is in background.

STOPPING

Application is stopping.

VisibilityState

static

string

Represents the current visibility state reported by the platform. It may be UNKNOWN if the cast platform was unable to determine the state yet.

Value

VISIBLE

NOT_VISIBLE

UNKNOWN

Properties

DeviceCapabilities

static

string

Device capabilities.

Value

AUDIO_ASSISTANT

Assistant support, that is, the devices have a microphone and respond to 'Ok Google' and voice commands.

BLUETOOTH_SUPPORTED

Bluetooth support.

DISPLAY_SUPPORTED

Display output support. For example, Chromecast and Cast TVs have display support, Chromecast Audio and Google Home have not.

HI_RES_AUDIO_SUPPORTED

Hi-res audio (up to 24-bit / 96KHz) support.

IS_DV_SUPPORTED

Dolby Vision support of the current setup (that is, Chromecast and the TV it is connected to).

IS_HDR_SUPPORTED

HDR video support of the current setup (that is, Chromecast and the TV it is connected to).

TOUCH_INPUT_SUPPORTED

Touch input support, that is, the devices have a touchable display (e.g. Google Smart Display).

DisconnectReason

static

string

Represents the disconnect reason.

Value

REQUESTED_BY_SENDER

Connection close was actively requested by the sender application (usually triggered by the user).

ERROR

There was a protocol error.

UNKNOWN

It is unknown if the sender requested to disconnect gracefully calling close (most likely it didn't, but the close message could have been lost). This normally happens when there is a network timeout or if the sender application crashes or if the sender OS closes the socket.

EventType

static

string

System events dispatched by cast.receiver.CastReceiverManager.

Value

READY

Fired when the system is ready.

SHUTDOWN

Fired when the application is terminated.

SENDER_CONNECTED

Fired when a new sender has connected.

SENDER_DISCONNECTED

Fired when a sender has disconnected.

ERROR

Fired when there is a system error.

SYSTEM_VOLUME_CHANGED

Fired when the system volume has changed.

VISIBILITY_CHANGED

Fired when the visibility of the application has changed (for example after a HDMI Input change or when the TV is turned off/on and the cast device is externally powered). Note that this API has the same effect as the webkitvisibilitychange event raised by your document, we provided it as CastReceiverManager API for convenience and to avoid a dependency on a webkit-prefixed event.

STANDBY_CHANGED

Fired when the standby state of the TV has changed. This event is related to the visibility chnaged event, as if the TV is in standby the visibility will be false, the visibility is more granular (as it also detects that the TV has selected a different channel) but it is not reliably detected in all TVs, standby can be used in those cases as most TVs implement it.

MAX_VIDEO_RESOLUTION_CHANGED

FEEDBACK_STARTED

Fired when system starts to create feedback report.

MessageType

static

string

Types of custom messages.

Value

STRING

Messages are free-form strings. The application is responsible for encoding/decoding the information transmitted.

JSON

Messages are JSON-encoded. The underlying transport will use a JSON encoded string.

StandbyState

static

string

Represents the current standby state reported by the platform. It may be UNKNOWN if the cast platform was unable to determine the state yet.

Value

STANDBY

NOT_STANDBY

UNKNOWN

SystemState

static

string

Represents the current system state.

Value

NOT_STARTED

The application has not been requested to start yet.

STARTING_IN_BACKGROUND

Application is starting but it is in background.

STARTING

Application is starting.

READY

Application is ready to send and receive messages and it is in foreground.

STOPPING_IN_BACKGROUND

Application is stopping but it is in background.

STOPPING

Application is stopping.

VisibilityState

static

string

Represents the current visibility state reported by the platform. It may be UNKNOWN if the cast platform was unable to determine the state yet.

Value

VISIBLE

NOT_VISIBLE

UNKNOWN