ReadonlygetThe current snapshot, the same object until something changes.
ReadonlysubscribeCall listener after every change, until the returned function is called.
Move a playing playhead by wallSeconds of wall time times the rate, stopping at the end. A paused playhead does not move.
Stop playing where the playhead is.
Start playing; from the end, play starts again at zero, which counts as a jump.
Show one second, clamped to [0, durationSeconds]; playing continues from it. Moving to another second counts as a jump. A second that is not finite is refused.
Set the subject's duration when an instance is ready, keeping the second within it.
It throws for a duration that is not a positive finite number.
Play rate subject seconds per wall second. It throws for a rate that is not positive and finite.
The inspector's playhead: the second shown, the subject's duration, whether it plays and how fast, kept outside React.
The render loop advances it and reads it directly every frame. The time readout reads its snapshot through
useSyncExternalStorewithsubscribeandgetSnapshot, and the time panel only whether it plays, so a playing frame re-renders the readout alone and a start or stop also the panel's play button. A snapshot is replaced, never changed, so its identity tells a reader whether anything moved. Seconds stay within[0, durationSeconds].The rate scales how fast the preview plays and is not part of the request: it changes no picture, and the capture grammar's
ratekey, stills per second, is a different quantity.