MediaPlaybackParameters

@IviExperimental(reasons = [])
data class MediaPlaybackParameters(    val timeInfo: LiveData<MediaPlaybackTimeInfo?>,     val playbackState: LiveData<IviPlaybackState>,     val activeSource: LiveData<SourceInfo?>,     val activeMediaItem: LiveData<IviMediaItem?>,     val activeQueue: LiveData<List<IviMediaItem>>,     val availableActions: LiveDataActionList,     val isBuffering: LiveData<Boolean>,     launchActionCallBack: ActionLaunchCall)

Media playback parameters given to the MediaPlaybackViewModel.

Parameters

timeInfo

The timeline information of the active media item. null if nothing is being played.

playbackState

The current playback state of the media item. IviPlaybackState.IDLE if nothing is being played or if no source is active.

activeSource

The active media source. null if no source is active.

activeMediaItem

The active media item. null if no media is active.

activeQueue

The current queue of media items. Empty if no queue is present.

availableActions

The LiveDataActionList provided for the current activeSource and activeMediaItem. Empty if nothing is being played or if no actions are currently advertised as available by the activeSource.

Each source supports different actions at different times. It is therefore not advisable to rely on any of them to be available at any specific moment.

isBuffering

Whether the current media source is buffering data to start or continue playing.

launchActionCallBack

Lambda that can be used by MediaPlaybackViewModel to launch the Actions.

Constructors

Link copied to clipboard
fun MediaPlaybackParameters(    timeInfo: LiveData<MediaPlaybackTimeInfo?>,     playbackState: LiveData<IviPlaybackState>,     activeSource: LiveData<SourceInfo?>,     activeMediaItem: LiveData<IviMediaItem?>,     activeQueue: LiveData<List<IviMediaItem>>,     availableActions: LiveDataActionList,     isBuffering: LiveData<Boolean>,     launchActionCallBack: ActionLaunchCall)

Properties

Link copied to clipboard
val activeMediaItem: LiveData<IviMediaItem?>
Link copied to clipboard
val activeQueue: LiveData<List<IviMediaItem>>
Link copied to clipboard
val activeSource: LiveData<SourceInfo?>
Link copied to clipboard
val availableActions: LiveDataActionList
Link copied to clipboard
val isBuffering: LiveData<Boolean>
Link copied to clipboard
val playbackState: LiveData<IviPlaybackState>
Link copied to clipboard
val timeInfo: LiveData<MediaPlaybackTimeInfo?>

Functions

Link copied to clipboard
fun asMediaControlContext(coroutineScope: CoroutineScope): MediaControlContext