/** * A playback clock for replay (doc 07). The application owns time (ADR-010): it creates a Playback, shows its * controls, and passes each tick to `runtime.setTime`. The engine never runs a clock on its own. */ import type { TimeRange } from '../core/types.js'; export interface PlaybackOptions { range: TimeRange; /** Start position. Default: range start. */ at?: string; /** Simulated seconds per real second. Default 1. */ speed?: number; /** Called with the new time on every tick and seek. */ onTime: (at: string) => void; /** Called when playback reaches the end of the range (and stops). */ onEnd?: () => void; /** Schedules the next frame. Default: requestAnimationFrame, else a 50 ms timer. */ frame?: (cb: (nowMs: number) => void) => void; now?: () => number; } export declare class Playback { private readonly options; private atMs; private startMs; private endMs; private speed; private playing; private lastReal; private generation; private readonly frame; private readonly now; constructor(options: PlaybackOptions); get time(): string; get isPlaying(): boolean; get rate(): number; get range(): TimeRange; play(): void; pause(): void; seek(at: string): void; setSpeed(speed: number): void; dispose(): void; }