HostPlaybackState

The playback control's state — null on a step with nothing to play, where the host draws no control at all.

@internote/canvas-sdk/hostInterface
On this page
import { HostPlaybackState } from '@internote/canvas-sdk/host';

Steps partition a scene's animation, and the control is scoped to the step the reader is on: it plays, pauses and replays that step's choreography, not the whole canvas. A scene with no steps has one partition, so its control is the whole scene's transport — which is what the control used to be everywhere.

Null covers two cases, and the second is the reason this is a state rather than a duration: a step that animates nothing, and one whose whole choreography is a brief plain-cue reveal. Neither has a middle for the reader to stop in.

#Fields

finishedRequired
The current step's animation has run out (replay is what is on offer).
boolean
pausedRequired
Whether the scene clock is paused.
boolean
progressRequired
0..1 through the current step's animation.
number
replayRequired
Play the current step's animation again (the scene's, with no steps).
() => void
toggleRequired
Pauses the scene clock, or resumes it when paused.
() => void
waitingRequired
Whether the step is waiting to be played for the first time — a !autoplay scene's step the reader has not started yet, as opposed to one they paused. The control draws itself as the thing to press.
boolean

Declared in packages/canvas-sdk/src/host/host-state.ts:34.

Last updated