cast.framework. system
This is the cast.framework.system namespace.
Classes
ApplicationData
Represents the data of the launched application.
Event
Event dispatched by cast.framework.CastReceiverContext which contains system information.
FeedbackStartedEvent
Event dispatched by cast.framework.CastReceiverContext when the systems starts to create feedback report.
MaxVideoResolutionChangedEvent
Event dispatched by cast.framework.CastReceiverContext when the system needs to update the restriction on maximum video resolution.
ReadyEvent
Event dispatched by cast.framework.CastReceiverContext when the system is ready.
Sender
Represents the data of a connected sender device.
SenderConnectedEvent
Event dispatched by cast.framework.CastReceiverContext when a sender is connected.
SenderDisconnectedEvent
Event dispatched by cast.framework.CastReceiverContext when a sender is disconnected.
ShutdownEvent
Event dispatched by cast.framework.CastReceiverContext when the application is shutdown.
StandbyChangedEvent
Event dispatched by cast.framework.CastReceiverContext when the TV enters/leaves the standby state.
SystemVolumeChangedEvent
Event dispatched by cast.framework.CastReceiverContext when the system volume changes.
SystemVolumeData
Represents the system volume data.
VisibilityChangedEvent
Event dispatched by cast.framework.CastReceiverContext when the visibility of the application changes (HDMI input change, TV is turned off).
Enumerations
DeviceCapabilities
string
Device capabilities.
Value |
|
---|---|
AUDIO_ASSISTANT |
Audio Assistant support. For example, Google Home and Google Home Mini. |
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. For example, Google Nest Hub and Google Nest Hub Max. |
IS_GROUP |
If the device is a virtual device and represents a group target rather than standalone. |
DisconnectReason
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
string
System events dispatched by cast.framework.CastReceiverContext.
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 cast.framework.CastReceiverContext 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 changed 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. |
LaunchedFrom
string
Represent where the receiver was launched from.
Value |
|
---|---|
UNKNOWN |
The launch owner could not be determined. |
DIAL |
App was launched by DIAL request. |
CAST |
App was launched by Cast V2 request. |
CLOUD |
App was launched by assistant request (e.g. voice command). |
MessageType
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
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
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
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
string
Device capabilities.
Value |
|
---|---|
AUDIO_ASSISTANT |
Audio Assistant support. For example, Google Home and Google Home Mini. |
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. For example, Google Nest Hub and Google Nest Hub Max. |
IS_GROUP |
If the device is a virtual device and represents a group target rather than standalone. |
DisconnectReason
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
string
System events dispatched by cast.framework.CastReceiverContext.
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 cast.framework.CastReceiverContext 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 changed 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. |
LaunchedFrom
string
Represent where the receiver was launched from.
Value |
|
---|---|
UNKNOWN |
The launch owner could not be determined. |
DIAL |
App was launched by DIAL request. |
CAST |
App was launched by Cast V2 request. |
CLOUD |
App was launched by assistant request (e.g. voice command). |
MessageType
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
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
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
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 |