SimpleProgressTrackerState

class SimpleProgressTrackerState(player: Player, coroutineScope: CoroutineScope) : ProgressTrackerState

Player progress tracker that only updated the player's actual progress when onFinished is called.

Parameters

player

The Player whose current position must be tracked.

coroutineScope

Constructors

Link copied to clipboard
constructor(player: Player, coroutineScope: CoroutineScope)

Properties

Link copied to clipboard
open override val progress: StateFlow<Duration>

Emits the current progress, which can be either the value being manually set, or the actual Player progress.

Functions

Link copied to clipboard
open override fun onChanged(progress: Duration)

Callback to invoke when the progress is being manually changed.

Link copied to clipboard
open override fun onFinished()

Callback to invoke when the progress is no longer being changed.