cast.framework. system
This is the cast.framework.system
namespace.
Classes
ApplicationData
Metadata describing the data of the launched application.
Event
An event dispatched by cast.framework.CastReceiverContext which contains system information.
FeedbackStartedEvent
An event dispatched by cast.framework.CastReceiverContext when the system starts to create a feedback report.
MaxVideoResolutionChangedEvent
An event dispatched by cast.framework.CastReceiverContext when the system needs to update the restriction on maximum video resolution.
Message
A custom message received from a sender. To listen for custom events use the cast.framework.CastReceiverContext#addCustomMessageListener method.
ReadyEvent
An event dispatched by cast.framework.CastReceiverContext when the system is ready.
Sender
This represents the data of a connected sender device.
SenderConnectedEvent
An event dispatched by cast.framework.CastReceiverContext when a sender is connected.
SenderDisconnectedEvent
An event dispatched by cast.framework.CastReceiverContext when a sender is disconnected.
ShutdownEvent
An event dispatched by cast.framework.CastReceiverContext when the application is shut down.
StandbyChangedEvent
An event dispatched by cast.framework.CastReceiverContext when the TV
enters or leaves the standby state, so the application should always verify
the isStandby
property. To know if the actual status is unknown, the
application can call the
cast.framework.CastReceiverContext#getStandbyState method.
SystemVolumeChangedEvent
An event dispatched by cast.framework.CastReceiverContext when the system volume changes.
SystemVolumeData
This represents the system volume data.
VisibilityChangedEvent
An event dispatched by cast.framework.CastReceiverContext when the visibility of the application changes - for instance, when the HDMI input changes, or the TV is turned off.
Enumerations
DeviceCapabilities
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 |
IS_CBCS_SUPPORTED |
string When set to |
IS_DOLBY_ATMOS_SUPPORTED |
string When set to |
DisconnectReason
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
|
EventType
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 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
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
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
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
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
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
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 |
IS_CBCS_SUPPORTED |
string When set to |
IS_DOLBY_ATMOS_SUPPORTED |
string When set to |
DisconnectReason
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
|
EventType
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 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
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
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
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
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
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 |