Package com.bambuser.broadcaster
Enum Class PlayerState
- All Implemented Interfaces:
Serializable
,Comparable<PlayerState>
,java.lang.constant.Constable
A
BroadcastPlayer
instance will always be in one of these states.
See the onStateChange(state)
callback or the getState()
method.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlayback is interrupted and the player is buffering data.This BroadcastPlayer instance has been closed and all system resources freed.The player reached the end of the loaded broadcast successfully.The player instance is constructed and optional parameters can be set.Playback failed, likely due to a network error.The player is negotiating with the server about available formats, and should move on to buffering soon.The player is paused.The player is actively playing a stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerState
Returns the enum constant of this class with the specified name.static PlayerState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONSTRUCTION
The player instance is constructed and optional parameters can be set. CallBroadcastPlayer.load()
to transition toLOADING
. -
LOADING
The player is negotiating with the server about available formats, and should move on to buffering soon. If the broadcast is not immediately available (for example if the video needs to be converted to another format), the player will wait and continue automatically when the broadcast becomes available. -
BUFFERING
-
PLAYING
The player is actively playing a stream. -
PAUSED
The player is paused. Usestart()
to resume playback. -
COMPLETED
The player reached the end of the loaded broadcast successfully. All buffered audio and video should now have finished playing. If the loaded broadcast is an archived broadcast, it is possible to replay usingstart()
. If the loaded broadcast was live, this is practically the final state. Useclose()
to free all system resources. If playback of the archived version is desired, useBroadcastPlayer(...)
to load the archived broadcast. -
ERROR
Playback failed, likely due to a network error. This is a final state. Useclose()
to free all system resources. -
CLOSED
This BroadcastPlayer instance has been closed and all system resources freed. The instance should no longer be used.
-
-
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
-