An AudioHandler plays audio, provides state updates and query results to
clients. It implements standard protocols that allow it to be remotely
controlled by the lock screen, media notifications, the iOS control center,
headsets, smart watches, car audio systems, and other compatible agents.
Provides an API to manage the app's AudioHandler. An app must call init
during initialisation to register the AudioHandler that will service all
requests to play audio.
Base class for implementations of AudioHandler. It provides default
implementations of all methods and streams. Each stream in this class is
specialized as either a BehaviorSubject or PublishSubject providing an
additional add method for emitting values on those streams.
A CompositeAudioHandler wraps another AudioHandler and adds additional
behaviour to it. Each method will by default pass through to the
corresponding method of the wrapped handler. If you override a method, it
must call super in addition to any "additional" functionality you add.
Custom action information used to define an action name and optional extras
that are sent to AudioHandler.customAction when the associated media control is used.
A button to appear in the Android notification, lock screen, Android smart
watch, or Android Auto device. The set of buttons you would like to display
at any given moment should be streamed via AudioHandler.playbackState.
The playback state which includes a playing boolean state, a processing
state such as AudioProcessingState.buffering, the playback position and
the currently enabled actions to be shown in the Android notification or the
iOS control center.
This mixin provides default implementations of methods for updating and
navigating the queue. When using this mixin, you must add a list of
MediaItems to queue, override skipToQueueItem and initialise the queue
index (e.g. by calling skipToQueueItem with the initial queue index). The
skipToNext and skipToPrevious default implementations are defined by
this mixin in terms of your own implementation of skipToQueueItem.