public enum PlayerState extends Enum<PlayerState>
BroadcastPlayer
instance will always be in one of these states.
See the onStateChange(state)
callback or the getState()
method.Enum Constant and Description |
---|
BUFFERING
Playback is interrupted and the player is buffering data.
|
CLOSED
This BroadcastPlayer instance has been closed and all system resources freed.
|
COMPLETED
The player reached the end of the loaded broadcast successfully.
|
CONSTRUCTION
The player instance is constructed and optional parameters can be set.
|
ERROR
Playback failed, likely due to a network error.
|
LOADING
The player is negotiating with the server about available formats,
and should move on to buffering soon.
|
PAUSED
The player is paused.
|
PLAYING
The player is actively playing a stream.
|
Modifier and Type | Method and Description |
---|---|
static PlayerState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PlayerState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlayerState CONSTRUCTION
BroadcastPlayer.load()
to transition to LOADING
.public static final PlayerState LOADING
public static final PlayerState BUFFERING
public static final PlayerState PLAYING
public static final PlayerState PAUSED
start()
to
resume playback.public static final PlayerState COMPLETED
start()
.
If the loaded broadcast was live, this is practically the final state. Use
close()
to free all system resources. If
playback of the archived version is desired, use BroadcastPlayer(...)
to load the archived broadcast.public static final PlayerState ERROR
close()
to free all system resources.public static final PlayerState CLOSED
public static PlayerState[] values()
for (PlayerState c : PlayerState.values()) System.out.println(c);
public static PlayerState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null