SmoothProgressTrackerState

class SmoothProgressTrackerState(player: PillarboxExoPlayer, coroutineScope: CoroutineScope, imageOutput: ImageOutput = ImageOutput.NO_OP) : ProgressTrackerState

A ProgressTrackerState implementation that updates the Player progress every time onChanged is called.

Parameters

player

The Player whose progress needs to be tracked.

coroutineScope

The CoroutineScope used for managing StateFlows.

imageOutput

The ImageOutput to render the image track.

Constructors

Link copied to clipboard
constructor(player: PillarboxExoPlayer, coroutineScope: CoroutineScope, imageOutput: ImageOutput = ImageOutput.NO_OP)

Properties

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

A StateFlow emitting the current progress, which can either be the progress manually set, or the actual progress of the underlying Player.

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 operation has finished.