MediaPlaybackTimeInfo
constructor(duration: Duration? = null, position: Duration? = null, playbackSpeed: Float = INVALID_PLAYBACK_SPEED, lastPositionUpdateTime: Duration = getElapsedTime())
Parameters
duration
Total length of a media item. null
if unavailable or infinite, otherwise a positive Duration.
position
The playback position in the media item. null
if unavailable, otherwise a zero or positive Duration.
playbackSpeed
The speed of playback as a multiple of normal playback. INVALID_PLAYBACK_SPEED when playback is not active (paused, buffering, or idle). When negative, playback is in reverse.
lastPositionUpdateTime
Elapsed real time since boot of the moment when position was last updated. Comparison with this value can be done by converting it to milliseconds and by using getElapsedTime.