Sequenceablepublic final class AVPlaybackState extends Object implements Sequenceable
SystemCapability.Multimedia#MEDIA| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
AVPlaybackState.AVPlaybackCustomAction |
Extends
AVController actions, for example, an action for setting loop
playback. |
static class |
AVPlaybackState.Builder |
A static inner class of
AVPlaybackState to construct instances. |
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<AVPlaybackState> |
CREATOR |
Indicates the
AVPlaybackState object unmarshalled from a Parcel. |
static long |
PLAYBACK_ACTION_FAST_FORWARD |
Indicates that this media session supports the FAST FORWARD action.
|
static long |
PLAYBACK_ACTION_PAUSE |
Indicates that this media session supports the PAUSE action.
|
static long |
PLAYBACK_ACTION_PLAY |
Indicates that this media session supports the PLAYBACK action.
|
static long |
PLAYBACK_ACTION_PLAY_FROM_MEDIA_ID |
Indicates that this media session supports starting playback from a specified media ID.
|
static long |
PLAYBACK_ACTION_PLAY_FROM_SEARCH |
Indicates that this media session supports starting playback from a specified search result.
|
static long |
PLAYBACK_ACTION_PLAY_FROM_URI |
Indicates that this media session supports starting playback from the media item with a specified URI.
|
static long |
PLAYBACK_ACTION_PLAY_PAUSE |
Indicates that this media session supports a switchover between the PLAY and PAUSE actions.
|
static long |
PLAYBACK_ACTION_PREPARE |
Indicates that this media session supports the PREPARE action.
|
static long |
PLAYBACK_ACTION_PREPARE_FROM_MEDIA_ID |
Indicates that this media session supports preparation for playing a specified media ID.
|
static long |
PLAYBACK_ACTION_PREPARE_FROM_SEARCH |
Indicates that this media session supports preparation for playing a specified search result.
|
static long |
PLAYBACK_ACTION_PREPARE_FROM_URI |
Indicates that this media session supports preparation for playing the media item with a specified URI.
|
static long |
PLAYBACK_ACTION_REWIND |
Indicates that this media session supports the REWIND action.
|
static long |
PLAYBACK_ACTION_SEEK_TO |
Indicates that this media session supports moving to a new position in the media stream.
|
static long |
PLAYBACK_ACTION_SET_RATING |
Indicates that this media session supports the RATING action.
|
static long |
PLAYBACK_ACTION_SKIP_TO_NEXT |
Indicates the next command.
|
static long |
PLAYBACK_ACTION_SKIP_TO_PREVIOUS |
Indicates that this media session supports the PREVIOUS action.
|
static long |
PLAYBACK_ACTION_SKIP_TO_QUEUE_ITEM |
Indicates that this media session supports starting playback from a specified media item in the queue.
|
static long |
PLAYBACK_ACTION_STOP |
Indicates that this media session supports the STOP action.
|
static long |
PLAYBACK_POSITION_ERROR |
Indicates an invalid playback position.
|
static int |
PLAYBACK_STATE_BUFFERING |
Indicates the BUFFERING state.
|
static int |
PLAYBACK_STATE_CONNECTING |
Indicates that the client is connecting to the server.
|
static int |
PLAYBACK_STATE_ERROR |
Indicates the ERROR state.
|
static int |
PLAYBACK_STATE_FAST_FORWARDING |
Indicates the FAST FORWARDING state.
|
static int |
PLAYBACK_STATE_NONE |
Indicates the default playback state.
|
static int |
PLAYBACK_STATE_PAUSED |
Indicates the PAUSED state.
|
static int |
PLAYBACK_STATE_PLAYING |
Indicates the PLAYBACK state.
|
static int |
PLAYBACK_STATE_REWINDING |
Indicates the REWINDING state.
|
static int |
PLAYBACK_STATE_SKIPPING_TO_NEXT |
Indicates the NEXT state.
|
static int |
PLAYBACK_STATE_SKIPPING_TO_PREVIOUS |
Indicates the PREVIOUS state.
|
static int |
PLAYBACK_STATE_SKIPPING_TO_QUEUE_ITEM |
Indicates the state of moving to a specified media item in the queue.
|
static int |
PLAYBACK_STATE_STOPPED |
Indicates the STOPPED state.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
long |
getActiveQueueElementId() |
Obtains the ID of the active media item in the playback queue.
|
long |
getAVPlaybackActions() |
Obtains the actions supported by this
AVSession instance. |
List<AVPlaybackState.AVPlaybackCustomAction> |
getAVPlaybackCustomActions() |
Obtains the custom action list.
|
CharSequence |
getAVPlaybackErrorMessage() |
Obtains the message displayed when an error occurs during playback.
|
float |
getAVPlaybackSpeed() |
Obtains the current playback speed.
|
int |
getAVPlaybackState() |
Obtains the playback state.
|
long |
getCurrentBufferedPosition() |
Obtains the buffer's position.
|
long |
getCurrentPosition() |
Obtains the current playback position.
|
long |
getLastPositionChangedTime() |
Obtains the time elapsed since the last playback position change.
|
PacMap |
getOptions() |
Obtains other optional information about the playback state.
|
boolean |
marshalling(Parcel out) |
Marshalls the
AVPlaybackState object to a Parcel. |
String |
toString() |
Returns a string representation of the object.
|
boolean |
unmarshalling(Parcel in) |
Unmarshalls the
AVPlaybackState object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFileDescriptorpublic static Sequenceable.Producer<AVPlaybackState> CREATOR
AVPlaybackState object unmarshalled from a Parcel.public static final long PLAYBACK_ACTION_FAST_FORWARD
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PAUSE
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PLAY
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PLAY_FROM_MEDIA_ID
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PLAY_FROM_SEARCH
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PLAY_FROM_URI
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PLAY_PAUSE
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PREPARE
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PREPARE_FROM_MEDIA_ID
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PREPARE_FROM_SEARCH
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_PREPARE_FROM_URI
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_REWIND
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_SEEK_TO
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_SET_RATING
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_SKIP_TO_NEXT
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_SKIP_TO_PREVIOUS
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_SKIP_TO_QUEUE_ITEM
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_ACTION_STOP
AVPlaybackState.Builder.setAVPlaybackActions(long),
常量字段值public static final long PLAYBACK_POSITION_ERROR
public static final int PLAYBACK_STATE_BUFFERING
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_CONNECTING
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_ERROR
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_FAST_FORWARDING
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_NONE
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_PAUSED
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_PLAYING
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_REWINDING
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_SKIPPING_TO_NEXT
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_SKIPPING_TO_PREVIOUS
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_SKIPPING_TO_QUEUE_ITEM
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public static final int PLAYBACK_STATE_STOPPED
AVPlaybackState.Builder.setAVPlaybackState(int, long, float, long),
常量字段值public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public boolean marshalling(Parcel out)
AVPlaybackState object to a Parcel.marshalling 在接口中 Sequenceableout - Indicates the Parcel object for marshalling.true if marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
AVPlaybackState object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object for unmarshalling.true if unmarshalling is successful; returns false otherwise.public int getAVPlaybackState()
PLAYBACK_STATE_NONEPLAYBACK_STATE_STOPPEDPLAYBACK_STATE_PAUSEDPLAYBACK_STATE_PLAYINGPLAYBACK_STATE_FAST_FORWARDINGPLAYBACK_STATE_REWINDINGPLAYBACK_STATE_BUFFERINGPLAYBACK_STATE_ERRORPLAYBACK_STATE_CONNECTINGPLAYBACK_STATE_SKIPPING_TO_PREVIOUSPLAYBACK_STATE_SKIPPING_TO_NEXTPLAYBACK_STATE_SKIPPING_TO_QUEUE_ITEMpublic long getCurrentPosition()
public long getCurrentBufferedPosition()
public float getAVPlaybackSpeed()
public long getAVPlaybackActions()
AVSession instance. Available actions are as follows:
PLAYBACK_ACTION_STOPPLAYBACK_ACTION_PAUSEPLAYBACK_ACTION_PLAYPLAYBACK_ACTION_REWINDPLAYBACK_ACTION_SKIP_TO_PREVIOUSPLAYBACK_ACTION_SKIP_TO_NEXTPLAYBACK_ACTION_FAST_FORWARDPLAYBACK_ACTION_SET_RATINGPLAYBACK_ACTION_SEEK_TOPLAYBACK_ACTION_PLAY_PAUSEPLAYBACK_ACTION_PLAY_FROM_MEDIA_IDPLAYBACK_ACTION_PLAY_FROM_SEARCHPLAYBACK_ACTION_SKIP_TO_QUEUE_ITEMPLAYBACK_ACTION_PLAY_FROM_URIPLAYBACK_ACTION_PREPAREPLAYBACK_ACTION_PREPARE_FROM_MEDIA_IDPLAYBACK_ACTION_PREPARE_FROM_SEARCHPLAYBACK_ACTION_PREPARE_FROM_URIpublic List<AVPlaybackState.AVPlaybackCustomAction> getAVPlaybackCustomActions()
public CharSequence getAVPlaybackErrorMessage()
public long getLastPositionChangedTime()
public long getActiveQueueElementId()
public PacMap getOptions()
null if no optional
information is available.