MediaControlContext

fun MediaControlContext(    source: LiveSourceId,     playbackState: LiveData<IviPlaybackState>,     activeMediaItem: LiveData<IviMediaItem?>,     actions: LiveDataActionList,     actionLauncher: ActionLaunchCall,     coroutineScope: CoroutineScope)

Parameters

source

Source ID of the active source. Is null if no source is playing.

playbackState

Playback state of the active source. IviPlaybackState.IDLE if nothing is being played, or when a source is not active.

activeMediaItem

Active media item from the current source. null if nothing is being played, or when a source is not active.

actions

List of actions provided by the active source. Empty if no source is active, or when no actions are currently available.

At any given time, a source determines which Actions are available: this list can be observed to react to any changes made by the source.

If the current source changes, the list will also change to reflect that source's available list of Actions.

actionLauncher

Lambda that can be used to launch the actions.

coroutineScope

The scope which the MediaControls will run coroutines in.