MediaButtonsViewModel

@IviExperimental(reasons = [])
class MediaButtonsViewModel(mediaControlContext: MediaControlContext, mediaButtonsConfiguration: LiveData<MediaButtonsConfiguration>)

ViewModel for media buttons that can be used directly in views where the playback controls are displayed. Provides lists of TtButtonViewModel for the primary and secondary media controls defined by MediaButtonsConfiguration.

Parameters

mediaControlContext

Provides access to contextual information for MediaControls.

mediaButtonsConfiguration

Provides configuration of standard and custom media controls, and their display limits.

Constructors

Link copied to clipboard
constructor(mediaControlContext: MediaControlContext, mediaButtonsConfiguration: LiveData<MediaButtonsConfiguration>)

Properties

Link copied to clipboard
val primaryButtons: LiveData<List<TtButtonViewModel>>

Primary media buttons are the most important and frequently used controls for managing playback, ideally positioned in a way that is easily reached by the driver.

Link copied to clipboard
val secondaryButtons: LiveData<List<TtButtonViewModel>>

Secondary media buttons are less frequently used controls of the playback mode and custom source-specific controls.