Function

usePlaybackEffect

Subscribes to real-time playback events (enter, update, leave) for a specific clip as the global playhead crosses the clip's boundary timestamps.

Signature

Type Definition
usePlaybackEffect(clipId: string, callbacks: { onEnter: (time: RationalTime) => void; onLeave: (time: RationalTime) => void; onUpdate: (time: RationalTime) => void }): void

Parameters

NameTypeDescription
clipIdstringThe unique string ID of the target clip to track.
callbacks{ onEnter: (time: RationalTime) => void; onLeave: (time: RationalTime) => void; onUpdate: (time: RationalTime) => void }Callback handlers triggered on transition crossings.

Returns

void