/**
 * BradlyPlayerRef — Type definitions for the Player's imperative API.
 *
 * Mirrors Remotion's PlayerRef interface for drop-in compatibility.
 */

export interface BradlyPlayerRef {
  /** Start playback */
  play: () => void;
  /** Pause playback */
  pause: () => void;
  /** Toggle play/pause */
  toggle: () => void;
  /** Jump to a specific frame */
  seekTo: (frame: number) => void;
  /** Get the current frame number */
  getCurrentFrame: () => number;
  /** Check if currently playing */
  isPlaying: () => boolean;
  /** Get total duration in frames */
  getDuration: () => number;
  /** Add an event listener */
  addEventListener: (
    event: 'frameupdate' | 'play' | 'pause' | 'ended',
    handler: (e: { detail: { frame: number } }) => void
  ) => void;
  /** Remove an event listener */
  removeEventListener: (
    event: 'frameupdate' | 'play' | 'pause' | 'ended',
    handler: (e: { detail: { frame: number } }) => void
  ) => void;
}

export interface VideoConfig {
  fps: number;
  width: number;
  height: number;
  durationInFrames: number;
}
