Package com.adaptr.android.playersdk

Types

Adaptr
Link copied to clipboard
object Adaptr

Adaptr creates and manages a single AdaptrPlayer and associates it with an Android Service and Notification. By using this class, music playback may continue when your app is backgrounded, and playback controls will appear in a notification and the lock screen. Additionally, media controller events (play/pause, skip) will be honored automatically. If you don't want the Adaptr library to create a Service or handle Notifications, then you should create and manage your own instance of AdaptrPlayer, rather than use this class.

AdaptrException
Link copied to clipboard
class AdaptrException(wrappedException: Exception) : Exception

Exceptions that are generated by FeedFM library that cannot be handled directly.

AdaptrPlayer
Link copied to clipboard
class AdaptrPlayer

Adaptr Media client that retrieves music from the Adaptr servers and plays them on the local device. The player can be assigned either an on demand AudioFile from search or playlists/Stations or an active station from list of online stationList or offline localOfflineStationList stations using play.

ADLog
Link copied to clipboard
class ADLog(tag: String)
AudioFocusListener
Link copied to clipboard
interface AudioFocusListener

Interface for listening to Audio interruptions that were handled by Adaptr Audio Player.

AvailabilityListener
Link copied to clipboard
interface AvailabilityListener

This interface is implemented by clients that want to know when the player has determined whether music is available for playback or not.

CacheMediaListener
Link copied to clipboard
fun interface CacheMediaListener
CachePreparedListener
Link copied to clipboard
fun interface CachePreparedListener

This interface is used by the player to indicate when the the player has loaded enough song data to commence immediate playback on a call to play

ClientIdListener
Link copied to clipboard
interface ClientIdListener

When a request is made to createNewClientId, this listener will be given the new client or notified when an error prevented a new id from being created.

ExoMixingAudioPlayer
Link copied to clipboard
class ExoMixingAudioPlayer(context: Context, looper: Looper) : MixingAudioPlayer

TODO: volume ramp goes out of whack if you pause during crossfade if the player volume is adjusted during a crossfade, the faders don't take that new volume into account. can the player be paused while stalled or buffering? a song either fails to prepare or starts and then either errors out or completes

LikeStatusChangeListener
Link copied to clipboard
fun interface LikeStatusChangeListener

When a song's like status changes, this listener is notified.

LogLevel
Link copied to clipboard
enum LogLevel : Enum<LogLevel>

Log Levels for FeedSDK

MixingAudioPlayer
Link copied to clipboard
interface MixingAudioPlayer

Created by eml.

MockLocations
Link copied to clipboard
enum MockLocations : Enum<MockLocations>
MusicQueuedListener
Link copied to clipboard
fun interface MusicQueuedListener

This interface is meant for clients that want to know when music is loaded and ready for immediate playback after calling setActiveStation.

NextSongProvider
Link copied to clipboard
class NextSongProvider(mSession: FeedSession)

This class keeps tracks of and provides music to different music sources like on Demand or station etc

OutOfMusicListener
Link copied to clipboard
fun interface OutOfMusicListener

If the player runs out of music in the current station, this event listener will be called. In the normal course of events, a streaming station should never run out of music!

PlayListener
Link copied to clipboard
interface PlayListener

This interface is for clients that want to be notified when a new track begins playback, advances playback, and any time the skippability of the current track changes.

PlaylistsListener
Link copied to clipboard
fun interface PlaylistsListener
PlaylistTrackListener
Link copied to clipboard
fun interface PlaylistTrackListener
ResultsListener
Link copied to clipboard
interface ResultsListener

Interface for results of track requests

SessionUpdateListener
Link copied to clipboard
fun interface SessionUpdateListener

Listener used to listen for an updated session with a list of updated stations.

SimulcastEventListener
Link copied to clipboard
interface SimulcastEventListener

Created by arv on 1/5/18.

SimulcastPlaybackState
Link copied to clipboard
enum SimulcastPlaybackState : Enum<SimulcastPlaybackState>
SimulcastStreamer
Link copied to clipboard
class SimulcastStreamer(context: Context, token: String, isPlayer: Boolean, eventListener: SimulcastEventListener)

SimulcastStreamer class can be used to playback simulcast streams

SkipListener
Link copied to clipboard
fun interface SkipListener

When a request is made to skip a song, the Adaptr servers will respond if the skip may proceed or not; this listener will be called after the request succeeds or fails.

State
Link copied to clipboard
enum State : Enum<State>

Current state of the player.

StateListener
Link copied to clipboard
fun interface StateListener

This interface supports clients that want to be informed when the player's state changes.

StationChangedListener
Link copied to clipboard
fun interface StationChangedListener

This interface supports clients that want to be notified when the player's active station has changed.

StationDownloadListener
Link copied to clipboard
fun interface StationDownloadListener

This interface is used to provide download progress notifications when using the downloadAndSync method to download offline music for playback.

UnhandledErrorListener
Link copied to clipboard
fun interface UnhandledErrorListener

If the player ever experiences an error that it hasn't seen before or cannot handle, it is sent to this listeners for reporting. The player internally retries failed commands, automatically reports failures to Adaptr, and tries to keep the player in a known and working state - this method is provided for clients to receive notice of these errors.