usePlayback
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.
API details from source
Section titled “API details from source”
Creates one component-owned animation playback handle for a hook slot.
usePlayback: (programInput: SignalValue<PibblAnimationProgram>, optionsInput?: SignalValue<PibblPlaybackOptionsInput>) => PibblPlaybackRelated API: usePlayback, SignalValue, PibblAnimationProgram, PibblPlayback.
Parameters
Section titled “Parameters”-
programInput— Animation program, optionally supplied by a signal. See SignalValue , PibblAnimationProgram . -
optionsInput— Playback configuration, optionally supplied by a signal. See SignalValue ,PibblPlaybackOptionsInput.
Returns
Section titled “Returns”Stable mount-owned playback controls and reactive status/time values. See PibblPlayback .
See also
Section titled “See also”View source — packages/core/src/lib/hooks/use-playback.ts:69
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Animation and scheduling companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Tween playback controls: Animate a signal and control the mounted playback with native buttons. Plain source
Interactive examples
Section titled “Interactive examples”Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.