import { DoneAware, Renderer } from '../../../types';
/**
 * A base class for rendering video frames using a 2D canvas.
 *
 * Provides utilities for frame capture, playback control, and detecting when a video has finished playing.
 * Implements the `Renderer` and `DoneAware` interfaces to integrate with a unified animation/rendering system.
 */
export declare class VideoRendererBase implements Renderer, DoneAware {
    /** The underlying HTML video element used as the media source */
    protected video: HTMLVideoElement;
    /** Internal offscreen canvas used to draw current video frame */
    protected canvas: HTMLCanvasElement;
    /** 2D rendering context for the offscreen canvas */
    protected ctx: CanvasRenderingContext2D;
    /** Timestamp of the last update (used for throttling if needed) */
    protected lastUpdate: number;
    /** Callback to invoke when video playback completes */
    private doneCallback;
    /**
     * Constructs a video renderer that will play and extract pixels from the provided source.
     *
     * @param src - The URL or path of the video to play
     */
    constructor({ src }: {
        src: string;
    });
    private handleEnded;
    /**
     * Resets the video to the beginning and pauses playback.
     */
    reset(): void;
    /**
     * Starts or resumes playback of the video.
     */
    play(): void;
    /**
     * Pauses video playback.
     */
    pause(): void;
    /**
     * Draws the current video frame onto the offscreen canvas at the given resolution.
     *
     * @param width - Desired canvas width
     * @param height - Desired canvas height
     */
    renderFrame(width: number, height: number): void;
    /**
     * Extracts the most recently rendered frame's pixel data as a flat RGBA array.
     *
     * @param width - Width of the canvas area to extract
     * @param height - Height of the canvas area to extract
     * @returns A Uint8ClampedArray containing RGBA values
     */
    readPixels(width: number, height: number): Uint8ClampedArray;
    /**
     * Registers a callback to be invoked once the video finishes playing.
     *
     * @param callback - Function to call on video end
     */
    onDone(callback: () => void): void;
    dispose(): void;
    /**
     * Utility method for timing-based frame updates (optional use).
     *
     * @param intervalMs - Minimum time between steps in milliseconds
     * @returns `true` if enough time has passed to trigger a new update
     */
    protected shouldStep(intervalMs: number): boolean;
}
//# sourceMappingURL=video-base-renderer.d.ts.map