Enum PlaybackState
- All Implemented Interfaces:
Serializable,Comparable<PlaybackState>
This model provides a common state machine for applications using different castLabs
players. Its states and transitions have the same meaning across those players. It is separate
from the legacy Android-specific PlayerController.State model. Read the current state
with PlayerController.getPlaybackState().
A state described as transient is an intermediate step. It remains the current state until the player confirms the next step, so it is not necessarily short-lived.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlayback is waiting for more media data.Playback or a seek reached the end of the content.Playback stopped because of a fatal error.No content is loaded or being opened.An open request was accepted and content information is being loaded.Playback can continue but is stably paused.The player is moving toward a stable paused state.Playback was requested but the playback position is not moving yet.The playback position is moving.The content track information is available and can be queried.An accepted change of playback position is being completed.Content and its playback resources are being unloaded. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlaybackStateReturns the enum constant of this type with the specified name.static PlaybackState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Idle
No content is loaded or being opened. This is the initial state. -
Stopping
Content and its playback resources are being unloaded.This is a transient state that normally ends in
Idle. -
Opening
An open request was accepted and content information is being loaded.This is a transient state that normally ends in
Ready. -
Error
Playback stopped because of a fatal error.This is a transient state in the Android implementation. A fatal error automatically releases the player, producing
Error -> Stopping -> Idle. -
Ready
The content track information is available and can be queried.This is a transient milestone before the current data state is reported.
-
Seeking
An accepted change of playback position is being completed.This is a transient state while the seek result is being determined.
-
Buffering
Playback is waiting for more media data.This is a transient state, but it can last as long as the required data is unavailable.
-
Play
Playback was requested but the playback position is not moving yet.This is a transient state that normally ends in
Playing. -
Playing
The playback position is moving. -
Pausing
The player is moving toward a stable paused state.This is a transient state that normally ends in
Paused. -
Paused
Playback can continue but is stably paused. -
Ended
Playback or a seek reached the end of the content.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-