MediaActionType enum

Specifies an action that the OS's background audio system may support.

Values are used both to request what actions are enabled (see AudioSystem.setSupportedMediaActionsMethod), and to specify what types of events have been received (see MediaEvent).

These inform both device displays (i.e. iOS lockscreen/control center) and external controllers (such as watches, auto displays, etc) on what controls to show.

Note that not all actions are supported on both Android and iOS.

Not yet supported:

  • cross-platform functionality: ratings/like/dislike, repeat mode, shuffle mode.
  • Android-specific functionality: playFromMediaId, playFromSearch, skipToQueueItem, playFromUri.
  • iOS-specific functionality: bookmark, language.

Constants

custom → const MediaActionType

Only used when receiving a MediaEvent from an Android custom button.

const MediaActionType(11)
next → const MediaActionType
const MediaActionType(4)
pause → const MediaActionType
const MediaActionType(1)
play → const MediaActionType
const MediaActionType(2)
playPause → const MediaActionType
const MediaActionType(0)
previous → const MediaActionType
const MediaActionType(5)
seekBackward → const MediaActionType
const MediaActionType(7)
seekForward → const MediaActionType
const MediaActionType(6)
seekTo → const MediaActionType

Enables use seeking in the progress bar.

const MediaActionType(8)
skipBackward → const MediaActionType
const MediaActionType(10)
skipForward → const MediaActionType
const MediaActionType(9)
stop → const MediaActionType
const MediaActionType(3)
values → const List<MediaActionType>

A constant List of the values in this enum, in order of their declaration.

const List<MediaActionType>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
override

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited