MockPlayableMedia

class MockPlayableMedia(val source: MediaSource, val duration: Duration = Duration.ZERO, var currentPlayTime: Duration = Duration.ZERO, val resolution: MutableStateFlow<Resolution> = MutableStateFlow(Resolution.ZERO), val tracks: List<TrackInfo> = emptyList()) : PlayableMedia

Mock implementation of PlayableMedia

Constructors

Link copied to clipboard
constructor(source: MediaSource, duration: Duration = Duration.ZERO, currentPlayTime: Duration = Duration.ZERO, resolution: MutableStateFlow<Resolution> = MutableStateFlow(Resolution.ZERO), tracks: List<TrackInfo> = emptyList())

Properties

Link copied to clipboard
open override var currentPlayTime: Duration

gets the Duration of playtime at the time this property is requested

Link copied to clipboard
open override val duration: Duration

the Duration of the media

Link copied to clipboard
open override val resolution: MutableStateFlow<Resolution>

a MutableStateFlow of the Resolution of the media. Note that if no MediaSurface has been bound to the media, this will be Resolution.ZERO

Link copied to clipboard
open override val source: MediaSource

the MediaSource on which the media is found

Link copied to clipboard
open override val tracks: List<TrackInfo>

a list of TrackInfo of the media