Agora Java API Reference for Android

Static Public Member Functions | Public Attributes | List of all members
io.agora.mediaplayer.Constants.MediaPlayerState Enum Reference

The playback state. More...

## Static Public Member Functions
static int | getValue (MediaPlayerState type)
static MediaPlayerState | fromNativeIndex (int nativeIndex)
static MediaPlayerState | getStateByValue (int value)

## Public Attributes
| PLAYER_STATE_UNKNOWN =(-1)
| PLAYER_STATE_IDLE =(0)
| PLAYER_STATE_OPENING =(1)
| PLAYER_STATE_OPEN_COMPLETED =(2)
| PLAYER_STATE_PLAYING =(3)
| PLAYER_STATE_PAUSED =(4)
| PLAYER_STATE_PLAYBACK_COMPLETED =(5)
| PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED =(6)
| PLAYER_STATE_STOPPED =(7)
| PLAYER_STATE_PAUSING_INTERNAL =(50)
| PLAYER_STATE_STOPPING_INTERNAL =(51)
| PLAYER_STATE_SEEKING_INTERNAL =(52)
| PLAYER_STATE_GETTING_INTERNAL =(53)
| PLAYER_STATE_NONE_INTERNAL =(54)
| PLAYER_STATE_DO_NOTHING_INTERNAL =(55)
| PLAYER_STATE_SET_TRACK_INTERNAL =(56)
| PLAYER_STATE_FAILED =(100)

## Detailed Description

The playback state.

## Member Data Documentation

## ◆ PLAYER_STATE_UNKNOWN

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_UNKNOWN =(-1)

-1: The player state is unknown.

## ◆ PLAYER_STATE_IDLE

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_IDLE =(0)

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

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPENING =(1)

1: Opening the media resource.

## ◆ PLAYER_STATE_OPEN_COMPLETED

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPEN_COMPLETED =(2)

2: Opens the media resource successfully.

## ◆ PLAYER_STATE_PLAYING

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PLAYING =(3)

3: The media resource is playing.

## ◆ PLAYER_STATE_PAUSED

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PAUSED =(4)

4: Pauses the playback.

## ◆ PLAYER_STATE_PLAYBACK_COMPLETED

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PLAYBACK_COMPLETED =(5)

5: The playback is complete.

## ◆ PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED =(6)

6: The loop is complete.

## ◆ PLAYER_STATE_STOPPED

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_STOPPED =(7)

7: The playback stops.

## ◆ PLAYER_STATE_PAUSING_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PAUSING_INTERNAL =(50)

Player pausing (internal)

## ◆ PLAYER_STATE_STOPPING_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_STOPPING_INTERNAL =(51)

Player stopping (internal)

## ◆ PLAYER_STATE_SEEKING_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_SEEKING_INTERNAL =(52)

Player seeking state (internal)

## ◆ PLAYER_STATE_GETTING_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_GETTING_INTERNAL =(53)

Player getting state (internal)

## ◆ PLAYER_STATE_NONE_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_NONE_INTERNAL =(54)

None state for state machine (internal)

## ◆ PLAYER_STATE_DO_NOTHING_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_DO_NOTHING_INTERNAL =(55)

Do nothing state for state machine (internal)

## ◆ PLAYER_STATE_SET_TRACK_INTERNAL

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_SET_TRACK_INTERNAL =(56)

Player set track state (internal)

## ◆ PLAYER_STATE_FAILED

io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_FAILED =(100)

100: The media player fails to play the media resource.