Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Struct Control

sealed struct Control
This type is used to represent the state of some control element related to media playback. The state of the control is intended to be acted upon by custom actions. See [Action]. For example, say a media playback application supports an “X-ray” feature, where the states are ON and OFF and the custom actions to turn it on/off are ENABLE_XRAY and DISABLE_XRAY, then the [MediaSessionState#controls] array should have one entry with the current state: [Control("X-ray", "OFF")]. Upon receiving [IMediaControlHandlerAsync#handleCustomAction] with action ENABLE_XRAY the media session should update the control state by updating [MediaSessionState#controls] with an entry such as [Control("X-ray", "ON")] and calling [IMediaControlServerAsync#updateMediaSessionStates]

Fields

Last modified on October 29, 2026