Package io.agora.mediaplayer
Enum Class Constants.MediaPlayerState
- All Implemented Interfaces:
Serializable,Comparable<Constants.MediaPlayerState>,Constable
- Enclosing class:
- Constants
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDo nothing state for state machine (internal)100: The media player fails to play the media resource.Player getting state (internal)0: The default state.None state for state machine (internal)2: Opens the media resource successfully.1: Opening the media resource.4: Pauses the playback.Player pausing (internal)6: The loop is complete.5: The playback is complete.3: The media resource is playing.Player seeking state (internal)Player set track state (internal)7: The playback stops.Player stopping (internal)-1: The player state is unknown. -
Method Summary
Modifier and TypeMethodDescriptionstatic Constants.MediaPlayerStatefromNativeIndex(int nativeIndex) static Constants.MediaPlayerStategetStateByValue(int value) static intstatic Constants.MediaPlayerStateReturns the enum constant of this class with the specified name.static Constants.MediaPlayerState[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
PLAYER_STATE_UNKNOWN
-1: The player state is unknown. -
PLAYER_STATE_IDLE
0: The default state. The media player returns this state code before you open the media resource or after you stop the playback. -
PLAYER_STATE_OPENING
1: Opening the media resource. -
PLAYER_STATE_OPEN_COMPLETED
2: Opens the media resource successfully. -
PLAYER_STATE_PLAYING
3: The media resource is playing. -
PLAYER_STATE_PAUSED
4: Pauses the playback. -
PLAYER_STATE_PLAYBACK_COMPLETED
5: The playback is complete. -
PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED
6: The loop is complete. -
PLAYER_STATE_STOPPED
7: The playback stops. -
PLAYER_STATE_PAUSING_INTERNAL
Player pausing (internal) -
PLAYER_STATE_STOPPING_INTERNAL
Player stopping (internal) -
PLAYER_STATE_SEEKING_INTERNAL
Player seeking state (internal) -
PLAYER_STATE_GETTING_INTERNAL
Player getting state (internal) -
PLAYER_STATE_NONE_INTERNAL
None state for state machine (internal) -
PLAYER_STATE_DO_NOTHING_INTERNAL
Do nothing state for state machine (internal) -
PLAYER_STATE_SET_TRACK_INTERNAL
Player set track state (internal) -
PLAYER_STATE_FAILED
100: The media player fails to play the media resource.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
-
fromNativeIndex
-
getStateByValue
-