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 Action

sealed struct Action
The Action type is designed to encapsulate the set of actions supported in a given media session. There are predefined Action constants that correspond to each concrete handler method in the [IMediaControlHandlerAsync] interface. However, a media session can specify additional custom actions. A media session advertises the set of actions through [Capabilities#actions], where Capabilities is specified in [MediaSessionState#capabilities]. For example, if a media session only supports “play, pause, stop” and a a couple of custom actions like “ENABLE_XRAY” and “DISABLE_XRAY”, then the [Capabilities#actions] array should contain {Action.PLAY, Action.PAUSE, Action.STOP, Action{"ENABLE_XRAY"}, Action{"DISABLE_XRAY}} Advertising a custom action means a media session will respond to [IMediaControlHandlerAsync#handleCustomAction] requests for that specific custom action.

Fields

Constants

PLAY

Action = {"PLAY"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handlePlay] requests.

PAUSE

Action = {"PAUSE"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handlePause] requests.

TOGGLE_PLAY_PAUSE

Action = {"TOGGLE_PLAY_PAUSE"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleTogglePlayPause] requests.

STOP

Action = {"STOP"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleStop] requests.

START_OVER

Action = {"START_OVER"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleStartOver] requests.

FAST_FORWARD

Action = {"FAST_FORWARD"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleFastForward] requests.

REWIND

Action = {"REWIND"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleRewind] requests.

SET_PLAYBACK_SPEED

Action = {"SET_PLAYBACK_SPEED"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetPlaybackSpeed] requests.

SKIP_FORWARD

Action = {"SKIP_FORWARD"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSkipForward] requests.

SKIP_BACKWARD

Action = {"SKIP_BACKWARD"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSkipBackward] requests.

SEEK

Action = {"SEEK"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSeek] requests.

SET_AUDIO_VOLUME

Action = {"SET_AUDIO_VOLUME"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetAudioVolume] requests.

SET_AUDIO_TRACK

Action = {"SET_AUDIO_TRACK"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetAudioTrack] requests.

ENABLE_TEXT_TRACK

Action = {"ENABLE_TEXT_TRACK"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleEnableTextTrack] requests.

DISABLE_TEXT_TRACK

Action = {"DISABLE_TEXT_TRACK"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleDisableTextTrack] requests.

NEXT

Action = {"NEXT"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleNext] requests.

PREVIOUS

Action = {"PREVIOUS"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handlePrevious] requests.

ENABLE_SHUFFLE

Action = {"ENABLE_SHUFFLE"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleEnableShuffle] requests.

SET_REPEAT_MODE

Action = {"SET_REPEAT_MODE"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetRepeatMode] requests.

SET_RATING

Action = {"SET_RATING"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetRating] requests.

GET_META_DATA

Action = {"GET_META_DATA"}
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleGetMetadataInfo] requests.
Last modified on October 29, 2026