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
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handlePlay] requests.Action={"PLAY"}
PAUSE
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handlePause] requests.Action={"PAUSE"}
TOGGLE_PLAY_PAUSE
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleTogglePlayPause] requests.Action={"TOGGLE_PLAY_PAUSE"}
STOP
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleStop] requests.Action={"STOP"}
START_OVER
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleStartOver] requests.Action={"START_OVER"}
FAST_FORWARD
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleFastForward] requests.Action={"FAST_FORWARD"}
REWIND
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleRewind] requests.Action={"REWIND"}
SET_PLAYBACK_SPEED
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetPlaybackSpeed] requests.Action={"SET_PLAYBACK_SPEED"}
SKIP_FORWARD
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSkipForward] requests.Action={"SKIP_FORWARD"}
SKIP_BACKWARD
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSkipBackward] requests.Action={"SKIP_BACKWARD"}
SEEK
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSeek] requests.Action={"SEEK"}
SET_AUDIO_VOLUME
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetAudioVolume] requests.Action={"SET_AUDIO_VOLUME"}
SET_AUDIO_TRACK
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetAudioTrack] requests.Action={"SET_AUDIO_TRACK"}
ENABLE_TEXT_TRACK
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleEnableTextTrack] requests.Action={"ENABLE_TEXT_TRACK"}
DISABLE_TEXT_TRACK
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleDisableTextTrack] requests.Action={"DISABLE_TEXT_TRACK"}
NEXT
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleNext] requests.Action={"NEXT"}
PREVIOUS
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handlePrevious] requests.Action={"PREVIOUS"}
ENABLE_SHUFFLE
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleEnableShuffle] requests.Action={"ENABLE_SHUFFLE"}
SET_REPEAT_MODE
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetRepeatMode] requests.Action={"SET_REPEAT_MODE"}
SET_RATING
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleSetRating] requests.Action={"SET_RATING"}
GET_META_DATA
Advertising support for this action means a media session will respond to [IMediaControlHandlerAsync#handleGetMetadataInfo] requests.Action={"GET_META_DATA"}

