import { TimelineClock } from '../../core/timeline'; import type { TimelineState } from '../../core/types'; /** * Create or adopt a `TimelineClock` and return React-friendly playback state. * * Two modes, picked at first render and locked thereafter: * * - `useTimeline(duration)` — creates and owns a new clock. Destroyed * on unmount. This is the root / single-owner case. * * - `useTimeline(duration, externalClock)` — reuses the passed clock * (e.g. from an outer ``). Does NOT call `destroy()` * on unmount — whoever created the clock destroys it. * * Returns: * - `clock` — pass to player components (they subscribe at the fps they need) * - `state` — discrete playback state (playing, rate, loop, duration). * Only re-renders when these values change (on seek events), * NOT on every frame. For currentTime, use `useClockValue(clock, fps)`. * * Duration is auto-detected from playlists via `usePlaylist(options, clock)`. */ export declare function useTimeline(duration?: number, externalClock?: TimelineClock | null): { clock: TimelineClock; state: TimelineState; play: () => void; pause: () => void; seek: (t: number) => void; setPlaybackRate: (r: number) => void; setLoop: (v: boolean) => void; }; //# sourceMappingURL=use-timeline.d.ts.map