Skip to content

usePlayback

Read as Markdown

usePlayback(program, options?) returns stable component-owned controls plus readonly status and current-time signals. Commands enter the next Begin phase; outputs publish atomically in Commit; milestones arrive in Complete after rendering. Removing the component releases registrations, writer leases, callbacks, commands, and stepper state, leaving retained controls inert.

See the animation contract.

Related types: PibblPlayback, PibblPlaybackOptions, and PibblAnimationProgram.

Creates one component-owned animation playback handle for a hook slot.

usePlayback: (programInput: SignalValue<PibblAnimationProgram>, optionsInput?: SignalValue<PibblPlaybackOptionsInput>) => PibblPlayback

Related API: usePlayback, SignalValue, PibblAnimationProgram, PibblPlayback.

  • programInput — Animation program, optionally supplied by a signal. See SignalValue , PibblAnimationProgram .

  • optionsInput — Playback configuration, optionally supplied by a signal. See SignalValue , PibblPlaybackOptionsInput .

Stable mount-owned playback controls and reactive status/time values. See PibblPlayback .

SignalValue

PibblAnimationProgram

PibblPlayback

View source — packages/core/src/lib/hooks/use-playback.ts:69

Read the Animation and scheduling companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.