Package-level declarations
Media controls; the classes in this package implement the concept of #media-controls.
Types
Type alias for the callback to invoke when a MediaControl's Action is launched.
A MediaControl which can be performed on active media.
Continuously picks the first visible media control from the given controls
list, and delegates all calls to it. If there is no visible control, it will delegate to the last control in the list.
Factory that creates an invisible MediaControl.
Type alias for a LiveData with the current media source, if one is playing.
A visual control for a media-related command. It can be used anywhere the user can interact with active media.
Provides access to contextual information for MediaControls. Actual use of the information provided by MediaControlContext is not mandatory.
Creates MediaControls within the given MediaControlContext.
Priority of a MediaControl. When room for controls is limited, their priority is used to determine which controls are displayed.
An ActionMediaControl that cycles between multiple states.
An ActionMediaControl always resulting in one single Action which can be performed on active media.
An ActionMediaControl with two states: activated and deactivated.
A MediaControl with two states: activated and deactivated. These will be automatically represented to the end-user by highlighting the given drawable when isActivated is true
.
Functions
Use a MediaServiceApi to obtain a MediaControlContext to use on MediaControls. The given viewModelScope should be attached to a LifecycleViewModel: it is necessary for MediaControls to perform asynchronous operations.