import { RationalTime } from "@techsquidtv/canvas-timeline-utils"; import { PlaybackOptions, TimelineCommandResult } from "@techsquidtv/canvas-timeline-core"; //#region src/hooks/playback/useTimelinePlayback.d.ts /** Result returned by `useTimelinePlayback`. */ interface UseTimelinePlaybackResult { /** Whether the timeline is currently playing. */ playing: boolean; /** Current playback speed multiplier. */ playbackRate: number; /** Current in point, when set. */ inPoint: RationalTime | undefined; /** Current out point, when set. */ outPoint: RationalTime | undefined; /** Starts timeline playback. */ play: (options?: PlaybackOptions) => TimelineCommandResult; /** Pauses timeline playback. */ pause: () => TimelineCommandResult; /** Starts playback when paused, or pauses playback when playing. */ togglePlayback: () => TimelineCommandResult; /** Sets the playback speed multiplier. */ setPlaybackRate: (rate: number) => TimelineCommandResult; /** Moves the playhead to an absolute time. */ setPlayheadTime: (time: RationalTime) => TimelineCommandResult; /** Advances the playhead by a number of seconds. */ stepForward: (amountSeconds?: number) => TimelineCommandResult; /** Moves the playhead backward by a number of seconds. */ stepBackward: (amountSeconds?: number) => TimelineCommandResult; /** Sets the in point to a supplied time or the current playhead. */ setInPoint: (time?: RationalTime) => TimelineCommandResult; /** Sets the out point to a supplied time or the current playhead. */ setOutPoint: (time?: RationalTime) => TimelineCommandResult; /** Clears both in and out points. */ clearInOutPoints: () => TimelineCommandResult; } /** * Provides canonical transport, playhead command, and in/out range commands. * * Compose this with `useTimelinePlayheadTime` when a component also needs a live * clock readout. * * @returns Playback state and transport commands for headless timeline controls. */ declare function useTimelinePlayback(): UseTimelinePlaybackResult; //#endregion export { UseTimelinePlaybackResult, useTimelinePlayback }; //# sourceMappingURL=useTimelinePlayback.d.mts.map