State

enum State : Enum<State>

Current state of the player.

Upon creation, the player starts out in either the AVAILABLE_OFFLINE_ONLY or State.UNINITIALIZED states while it waits for a response from the Adaptr servers. State.AVAILABLE_OFFLINE_ONLY indicates that offline music is available for immediate playback. State.UNINITIALIZED indicates that no offline music is available while the player awaits a response from Adaptr.

If the player is unable to contact the Adaptr servers or if the Adaptr servers indicate that no streaming music is available to this client, the player stays in the State.AVAILABLE_OFFLINE_ONLY state or transitions to the State.UNAVAILABLE state.

If the player is able to contact the Adaptr servers, and they indicate that streaming music is available, the player transitions to the State.READY_TO_PLAY state.

Once music playback begins, the player alternates between the State.WAITING_FOR_ITEM, State.STALLED, State.PLAYING, State.PAUSED, and State.READY_TO_PLAY states.

Entries

STALLED
Link copied to clipboard

This state indicates the player is waiting for music data to be returned to continue playback.

PAUSED
Link copied to clipboard

This state indicates the player has been paused

PLAYING
Link copied to clipboard

This state indicates the player is actively playing music.

READY_TO_PLAY
Link copied to clipboard

This state indicates the player is idle and ready for playback.

WAITING_FOR_ITEM
Link copied to clipboard

This state indicates that the player is waiting for the Adaptr servers to tell it what the next song should be.

AVAILABLE_OFFLINE_ONLY
Link copied to clipboard

The player is in this state immediately upon creation when offline music is available for playback. The player might soon transition to READY_TO_PLAY if the Adaptr servers indicate streaming music is also available to this client, or it will stay in this state until playback is started.

UNAVAILABLE
Link copied to clipboard

The player is in this state when there are no streaming stations available to this client (whether due to network connectivity problems or permission/license restriction issues) and no offline music available for playback. The player is useless at this point, as nothing is available for playback, and it should be discarded.

UNINITIALIZED
Link copied to clipboard

This is the initial state of the player, upon creation, before any contact is made with the Adaptr servers, and when there is no offline music available for playback. The player should shortly transition to UNAVAILABLE or READY_TO_PLAY.

Properties

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int