Namespace: system

Classes

Enumerations

DeviceCapabilities

static

string

Describes the capabilities of the current setup, which is made up of the Cast-enabled device and, where applicable, the display device it is connected to.

Value

AUDIO_ASSISTANT

string

Audio Assistant support. Examples of Cast-enabled devices with Audio Assistant support include the Google Home and the Google Home Mini.

BLUETOOTH_SUPPORTED

string

Bluetooth support.

DISPLAY_SUPPORTED

string

Display output support. Examples of Cast-enabled devices with display support include Chromecast and Cast TVs. Examples of Cast-enabled devices that lack display support include Chromecast Audio and Google Home.

HI_RES_AUDIO_SUPPORTED

string

High-resolution audio (up to 24-bit / 96KHz) support.

IS_DV_SUPPORTED

string

Dolby Vision support.

IS_HDR_SUPPORTED

string

HDR video support.

TOUCH_INPUT_SUPPORTED

string

Touch input support. Examples of Cast-enabled device that support touch input include Google Nest Hub and Google Nest Hub Max.

IS_GROUP

string

If the device is a virtual device and represents a group target rather than a physical device.

IS_DEVICE_REGISTERED

string

When set to true, this flag indicates that the Cast device is registered in the Cast Developer Console

IS_CBCS_SUPPORTED

string

When set to true, this flag indicates that the CBCS scheme (SAMPLE-AES) is supported.

IS_DOLBY_ATMOS_SUPPORTED

string

When set to true, this flag indicates that Dolby Atmos is supported through audio passthrough.

DisconnectReason

static

string

Represents the reason for a disconnect.

Value

REQUESTED_BY_SENDER

string

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

ERROR

string

There was a protocol error.

UNKNOWN

string

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

EventType

static

string

System events dispatched by cast.framework.CastReceiverContext.

Value

READY

string

Fired when the system is ready.

SHUTDOWN

string

Fired when the application is terminated.

SENDER_CONNECTED

string

Fired when a new sender has connected.

SENDER_DISCONNECTED

string

Fired when a sender has disconnected.

ERROR

string

Fired when there is a system error.

SYSTEM_VOLUME_CHANGED

string

Fired when the system volume has changed.

VISIBILITY_CHANGED

string

Fired when the visibility of the application has changed (for example after a HDMI input change or when the TV is turned off or on and the Cast device is externally-powered). Note that this API has the same effect as the 'webkitvisibilitychange' event raised by the browser. This is provided as the cast.framework.CastReceiverContext API for convenience and to avoid a dependency on a webkit-prefixed event.

STANDBY_CHANGED

string

Fired when the standby state of the TV has changed. This event is related to the cast.framework.system.EventType.VISIBILITY_CHANGED event, because if the TV is in standby mode, the visibility will be false.

Visibility states are more granular than standby states (because visibility also includes TV channel selection) but are not reliably detected in all TVs. Standby can be used in those cases because most TVs implement it.

MAX_VIDEO_RESOLUTION_CHANGED

string

FEEDBACK_STARTED

string

Fired when the system starts to create a feedback report.

LaunchedFrom

static

string

This represents what type of request launched the receiver.

Value

UNKNOWN

string

The launch owner could not be determined.

DIAL

string

App was launched by a DIAL request.

CAST

string

App was launched by a Cast V2 request.

CLOUD

string

App was launched by assistant request (for example, by a Google Assistant command).

MessageType

static

string

Types of custom messages.

Value

STRING

string

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

JSON

string

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

StandbyState

static

string

This represents the current standby state reported by the platform. It may be UNKNOWN if the Cast platform is unable to determine the state.

Value

STANDBY

string

NOT_STANDBY

string

UNKNOWN

string

SystemState

static

string

This represents the current system state.

Value

NOT_STARTED

string

The application has not been requested to start yet.

STARTING_IN_BACKGROUND

string

Application is starting but is not visible to the user.

STARTING

string

Application is starting.

READY

string

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

STOPPING_IN_BACKGROUND

string

Application is stopping while in the background.

STOPPING

string

Application is stopping.

VisibilityState

static

string

This represents the current visibility state reported by the platform. It may be UNKNOWN if the Cast platform is unable to determine the visibility state.

Value

VISIBLE

string

NOT_VISIBLE

string

UNKNOWN

string

Properties

DeviceCapabilities

static

string

Describes the capabilities of the current setup, which is made up of the Cast-enabled device and, where applicable, the display device it is connected to.

Value

AUDIO_ASSISTANT

string

Audio Assistant support. Examples of Cast-enabled devices with Audio Assistant support include the Google Home and the Google Home Mini.

BLUETOOTH_SUPPORTED

string

Bluetooth support.

DISPLAY_SUPPORTED

string

Display output support. Examples of Cast-enabled devices with display support include Chromecast and Cast TVs. Examples of Cast-enabled devices that lack display support include Chromecast Audio and Google Home.

HI_RES_AUDIO_SUPPORTED

string

High-resolution audio (up to 24-bit / 96KHz) support.

IS_DV_SUPPORTED

string

Dolby Vision support.

IS_HDR_SUPPORTED

string

HDR video support.

TOUCH_INPUT_SUPPORTED

string

Touch input support. Examples of Cast-enabled device that support touch input include Google Nest Hub and Google Nest Hub Max.

IS_GROUP

string

If the device is a virtual device and represents a group target rather than a physical device.

IS_DEVICE_REGISTERED

string

When set to true, this flag indicates that the Cast device is registered in the Cast Developer Console

IS_CBCS_SUPPORTED

string

When set to true, this flag indicates that the CBCS scheme (SAMPLE-AES) is supported.

IS_DOLBY_ATMOS_SUPPORTED

string

When set to true, this flag indicates that Dolby Atmos is supported through audio passthrough.

DisconnectReason

static

string

Represents the reason for a disconnect.

Value

REQUESTED_BY_SENDER

string

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

ERROR

string

There was a protocol error.

UNKNOWN

string

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

EventType

static

string

System events dispatched by cast.framework.CastReceiverContext.

Value

READY

string

Fired when the system is ready.

SHUTDOWN

string

Fired when the application is terminated.

SENDER_CONNECTED

string

Fired when a new sender has connected.

SENDER_DISCONNECTED

string

Fired when a sender has disconnected.

ERROR

string

Fired when there is a system error.

SYSTEM_VOLUME_CHANGED

string

Fired when the system volume has changed.

VISIBILITY_CHANGED

string

Fired when the visibility of the application has changed (for example after a HDMI input change or when the TV is turned off or on and the Cast device is externally-powered). Note that this API has the same effect as the 'webkitvisibilitychange' event raised by the browser. This is provided as the cast.framework.CastReceiverContext API for convenience and to avoid a dependency on a webkit-prefixed event.

STANDBY_CHANGED

string

Fired when the standby state of the TV has changed. This event is related to the cast.framework.system.EventType.VISIBILITY_CHANGED event, because if the TV is in standby mode, the visibility will be false.

Visibility states are more granular than standby states (because visibility also includes TV channel selection) but are not reliably detected in all TVs. Standby can be used in those cases because most TVs implement it.

MAX_VIDEO_RESOLUTION_CHANGED

string

FEEDBACK_STARTED

string

Fired when the system starts to create a feedback report.

LaunchedFrom

static

string

This represents what type of request launched the receiver.

Value

UNKNOWN

string

The launch owner could not be determined.

DIAL

string

App was launched by a DIAL request.

CAST

string

App was launched by a Cast V2 request.

CLOUD

string

App was launched by assistant request (for example, by a Google Assistant command).

MessageType

static

string

Types of custom messages.

Value

STRING

string

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

JSON

string

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

StandbyState

static

string

This represents the current standby state reported by the platform. It may be UNKNOWN if the Cast platform is unable to determine the state.

Value

STANDBY

string

NOT_STANDBY

string

UNKNOWN

string

SystemState

static

string

This represents the current system state.

Value

NOT_STARTED

string

The application has not been requested to start yet.

STARTING_IN_BACKGROUND

string

Application is starting but is not visible to the user.

STARTING

string

Application is starting.

READY

string

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

STOPPING_IN_BACKGROUND

string

Application is stopping while in the background.

STOPPING

string

Application is stopping.

VisibilityState

static

string

This represents the current visibility state reported by the platform. It may be UNKNOWN if the Cast platform is unable to determine the visibility state.

Value

VISIBLE

string

NOT_VISIBLE

string

UNKNOWN

string