positionFlow

abstract fun positionFlow(tick: Duration): Flow<Duration>(source)

Observes the playhead as a cold flow.

Emits at most once per tick of media time, snapped to that grid. Pass Duration.ZERO for every UI frame, which is only worth it for a smooth scrubber thumb, and even then prefer drawing over recomposing.

Return

a cold flow of playhead positions.

Parameters

tick

The grid to snap emissions to, or Duration.ZERO for every update.