Function: useProgress()
function useProgress(player: Player | undefined, intervalMs?: number): Progress;
Defined in: packages/player/src/hooks/useProgress.ts:82
A ticking view of the playback position.
The position is projected locally from the player's anchor — nothing is polled across the bridge, and no native call happens per tick. The interval exists purely to re-render this component, and is pause-aware: it runs only while playback is actually advancing, and is torn down on pause, on buffering, while seeking, and on unmount.
On subscribe (and whenever the player changes) a single precise resync runs
— one synchronous time-pos read — so a component that mounts mid-playback
starts from the truth rather than from a stale anchor.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
player | Player | undefined | undefined | The player, or undefined before it has been created. |
intervalMs | number | DEFAULT_PROGRESS_INTERVAL_MS | Re-render period in milliseconds. Defaults to 250. Pass 0 to disable the ticker and update only on state changes. |