java.lang.Object | |
↳ | android.support.v4.media.session.PlaybackStateCompat.Builder |
Builder for PlaybackStateCompat
objects.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an empty Builder.
| |||||||||||
Create a Builder using a
PlaybackStateCompat instance to set the
initial values.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the playback state object.
| |||||||||||
Set the current capabilities available on this session.
| |||||||||||
Set the current buffered position in ms.
| |||||||||||
Set a user readable error message.
| |||||||||||
Set the current state of playback.
| |||||||||||
Set the current state of playback.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create an empty Builder.
Create a Builder using a PlaybackStateCompat
instance to set the
initial values.
source | The playback state to copy. |
---|
Set the current capabilities available on this session. This should use a bitmask of the available capabilities.
Set the current buffered position in ms. This is the farthest playback point that can be reached from the current position using only buffered content.
Set a user readable error message. This should be set when the state
is STATE_ERROR
.
Set the current state of playback.
The position must be in ms and indicates the current playback
position within the track. If the position is unknown use
PLAYBACK_POSITION_UNKNOWN
.
The rate is a multiple of normal playback and should be 0 when paused and negative when rewinding. Normal playback rate is 1.0.
The state must be one of the following:
state | The current state of playback. |
---|---|
position | The position in the current item in ms. |
playbackSpeed | The current speed of playback as a multiple of normal playback. |
updateTime | The time in the elapsedRealtime()
timebase that the position was updated at. |
Set the current state of playback.
The position must be in ms and indicates the current playback
position within the track. If the position is unknown use
PLAYBACK_POSITION_UNKNOWN
.
The rate is a multiple of normal playback and should be 0 when paused and negative when rewinding. Normal playback rate is 1.0.
The state must be one of the following:
state | The current state of playback. |
---|---|
position | The position in the current track in ms. |
playbackSpeed | The current rate of playback as a multiple of normal playback. |