Package com.tomtom.ivi.appsuite.media.api.common.frontend.viewmodel

Media view models; these classes are used as view models for data binding in the media frontend views.

Types

Link copied to clipboard
class MediaButtonsConfiguration(    val replacedStandardControls: Map<StandardMediaControls, MediaControlFactory>,     val customControls: List<MediaControlFactory>,     val primaryMediaButtonsLimit: Int,     val secondaryMediaButtonsLimit: Int)

Configuration of media controls given to a MediaButtonsViewModel. Could be created from a MediaControlPolicy.

Link copied to clipboard
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.

Link copied to clipboard
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.

Link copied to clipboard
class MediaPlaybackViewModel(    mediaConfiguration: MediaConfiguration,     mediaPlaybackParameters: MediaPlaybackParameters,     viewModelCoroutineScope: CoroutineScope,     sourceAttributionFormat: SourceAttributionFormat = SourceAttributionFormat())

View model for playback information about the media currently being played, such as duration, elapsed time, title, artist, album, etc.

Link copied to clipboard
class TouchTrackViewModel(    mediaDuration: LiveData<Duration>,     isSeekActionSupported: LiveData<Boolean>,     viewModelCoroutineScope: CoroutineScope,     launchSeekAction: (SeekAction) -> Unit)

View model for a touch track control used in MediaPlaybackViewModel.

Functions

Link copied to clipboard
fun MediaServiceApi.asMediaPlaybackParameters(mediaConfiguration: MediaConfiguration): MediaPlaybackParameters