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/hostOn 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
finishedThe current step's animation has run out (replay is what is on offer).
booleanpausedWhether the scene clock is paused.
booleanprogress0..1 through the current step's animation.
numberreplayPlay the current step's animation again (the scene's, with no steps).
() => voidtogglePauses the scene clock, or resumes it when paused.
() => voidwaitingWhether 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.booleanDeclared in packages/canvas-sdk/src/host/host-state.ts:34.