O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

PlaybackStateCompat

class PlaybackStateCompat : Parcelable
kotlin.Any
   ↳ android.support.v4.media.session.PlaybackStateCompat

Playback state for a MediaSessionCompat. This includes a state like PlaybackStateCompat#STATE_PLAYING, the current playback position, and the current control capabilities.

Summary

Nested classes

Builder for PlaybackStateCompat objects.

CustomActions can be used to extend the capabilities of the standard transport controls by exposing app specific actions to Controllers.

Constants

static Long

Indicates this session supports the fast forward command.

static Long

Indicates this session supports the pause command.

static Long

Indicates this session supports the play command.

static Long

Indicates this session supports the play from media id command.

static Long

Indicates this session supports the play from search command.

static Long

Indicates this session supports the play from URI command.

static Long

Indicates this session supports the play/pause toggle command.

static Long

Indicates this session supports the prepare command.

static Long

Indicates this session supports the prepare from media id command.

static Long

Indicates this session supports the prepare from search command.

static Long

Indicates this session supports the prepare from URI command.

static Long

Indicates this session supports the rewind command.

static Long

Indicates this session supports the seek to command.

static Long

Indicates this session supports the set captioning enabled command.

static Long

Indicates this session supports the set rating command.

static Long

Indicates this session supports the set repeat mode command.

static Long

Indicates this session supports the set shuffle mode command.

static Long

Indicates this session supports the set shuffle mode enabled command.

static Long

Indicates this session supports the next command.

static Long

Indicates this session supports the previous command.

static Long

Indicates this session supports the skip to queue item command.

static Long

Indicates this session supports the stop command.

static Int

Error code when the action is interrupted due to some external event.

static Int

Error code when the application state is invalid to fulfill the request.

static Int

Error code when the request cannot be performed because authentication has expired.

static Int

Error code when too many concurrent streams are detected.

static Int

Error code when the requested content is already playing.

static Int

Error code when the playback navigation (previous, next) is not possible because the queue was exhausted.

static Int

Error code when the content is blocked due to being regionally unavailable.

static Int

Error code when the request is not supported by the application.

static Int

Error code when the content is blocked due to parental controls.

static Int

Error code when a premium account is required for the request to succeed.

static Int

Error code when the application cannot skip any more songs because skip limit is reached.

static Int

This is the default error code and indicates that none of the other error codes applies.

static Long

Use this value for the position to indicate the position is not known.

static Int

Use this value with MediaControllerCompat.TransportControls#setRepeatMode to indicate that the playback of the playing media list will be repeated.

static Int

Use this value with MediaControllerCompat.TransportControls#setRepeatMode to indicate that the playback of the playing media group will be repeated.

static Int

MediaControllerCompat.TransportControls#getRepeatMode returns this value when the session is not ready for providing its repeat mode.

static Int

Use this value with MediaControllerCompat.TransportControls#setRepeatMode to indicate that the playback will be stopped at the end of the playing media list.

static Int

Use this value with MediaControllerCompat.TransportControls#setRepeatMode to indicate that the playback of the current playing media item will be repeated.

static Int

Use this value with MediaControllerCompat.TransportControls#setShuffleMode to indicate that the media list will be played in shuffled order.

static Int

Use this value with MediaControllerCompat.TransportControls#setShuffleMode to indicate that the media group will be played in shuffled order.

static Int

MediaControllerCompat.TransportControls#getShuffleMode returns this value when the session is not ready for providing its shuffle mode.

static Int

Use this value with MediaControllerCompat.TransportControls#setShuffleMode to indicate that the media list will be played in order.

static Int

State indicating this item is currently buffering and will begin playing when enough data has buffered.

static Int

State indicating the class doing playback is currently connecting to a route.

static Int

State indicating this item is currently in an error state.

static Int

State indicating this item is currently fast forwarding.

static Int

This is the default playback state and indicates that no media has been added yet, or the performer has been reset and has no content to play.

static Int

State indicating this item is currently paused.

static Int

State indicating this item is currently playing.

static Int

State indicating this item is currently rewinding.

static Int

State indicating the player is currently skipping to the next item.

static Int

State indicating the player is currently skipping to the previous item.

static Int

State indicating the player is currently skipping to a specific item in the queue.

static Int

State indicating this item is currently stopped.

Public methods

Int

static PlaybackStateCompat!
fromPlaybackState(stateObj: Any!)

Creates an instance from a framework android.media.session.PlaybackState object.

Long

Get the current actions available on this session.

Long

Get the id of the currently active item in the queue.

Long

Get the current buffered position in ms.

MutableList<PlaybackStateCompat.CustomAction!>!

Get the list of custom actions.

Int

Get the error code.

CharSequence!

Get the user readable optional error message.

Bundle?

Get any custom extras that were set on this playback state.

Long

Get the elapsed real time at which position was last updated.

Float

Get the current playback speed as a multiple of normal playback.

Any!

Gets the underlying framework android.media.session.PlaybackState object.

Long

Get the playback position in ms at last position update time.

Int

Get the current state of playback.

static Int
toKeyCode(action: Long)

Translates a given action into a matched key code defined in KeyEvent.

String

Unit
writeToParcel(dest: Parcel!, flags: Int)

Properties

static Creator<PlaybackStateCompat!>!

Constants

ACTION_FAST_FORWARD

static val ACTION_FAST_FORWARD: Long

Indicates this session supports the fast forward command.

Value: 1 << 6

ACTION_PAUSE

static val ACTION_PAUSE: Long

Indicates this session supports the pause command.

Value: 1 << 1

ACTION_PLAY

static val ACTION_PLAY: