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 |
|
|
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 |
static Int |
Use this value with |
static Int |
|
static Int |
Use this value with |
static Int |
Use this value with |
static Int |
Use this value with |
static Int |
Use this value with |
static Int |
|
static Int |
Use this value with |
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 |
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 |
Long |
Get the playback position in ms at last position update time. |
Int |
getState() Get the current state of playback. |
static Int |
Translates a given action into a matched key code defined in |
String |
toString() |
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
See Also