/** * Playback Engine * * Handles timeline control, event scheduling, and playback speed. */ import type { KakiatoEvent } from '../core/types.js'; export interface PlaybackOptions { speed?: number; loop?: boolean; } export type PlaybackEventHandler = (event: KakiatoEvent, index: number) => void; export declare class PlaybackEngine { private events; private currentIndex; private isPlaying; private speed; private loop; private timeoutId; private startTime; private pausedAt; private onEventHandlers; constructor(options?: PlaybackOptions); /** * Load events for playback */ loadEvents(events: KakiatoEvent[]): void; /** * Add event handler */ onEvent(handler: PlaybackEventHandler): void; /** * Remove event handler */ offEvent(handler: PlaybackEventHandler): void; /** * Start playback */ play(): void; /** * Pause playback */ pause(): void; /** * Stop playback and reset */ stop(): void; /** * Seek to specific time (in milliseconds) */ seek(time: number): void; /** * Set playback speed */ setSpeed(speed: number): void; /** * Get current playback speed */ getSpeed(): number; /** * Get current playback time */ getCurrentTime(): number; /** * Get total duration */ getDuration(): number; /** * Get current event index */ getCurrentIndex(): number; /** * Check if playing */ getIsPlaying(): boolean; /** * Schedule the next event */ private scheduleNextEvent; /** * Emit event to all handlers */ private emitEvent; } //# sourceMappingURL=engine.d.ts.map