import { Renderable, Value } from '@tempots/dom';
export type BaseVideoProgress = {
    played: number;
    playedSeconds: number;
    loaded: number;
    loadedSeconds: number;
};
export type BaseVideoConfig = {
    file?: {
        forceHLS?: boolean;
        attributes?: Record<string, string | number | boolean>;
    };
    hls?: Record<string, unknown>;
};
export type BaseVideoPlayerOptions = {
    url: Value<string | null>;
    playing?: Value<boolean>;
    loop?: Value<boolean>;
    controls?: Value<boolean>;
    volume?: Value<number>;
    muted?: Value<boolean>;
    playbackRate?: Value<number>;
    pip?: Value<boolean>;
    playsinline?: Value<boolean>;
    width?: Value<string | number | undefined>;
    height?: Value<string | number | undefined>;
    progressInterval?: Value<number>;
    seekTo?: Value<number | null | undefined>;
    config?: BaseVideoConfig;
    onReady?: () => void;
    onStart?: () => void;
    onPlay?: () => void;
    onPause?: () => void;
    onBuffer?: () => void;
    onBufferEnd?: () => void;
    onEnded?: () => void;
    onError?: (e: unknown) => void;
    onDuration?: (seconds: number) => void;
    onSeek?: (seconds: number) => void;
    onProgress?: (progress: BaseVideoProgress) => void;
    onPlaybackRateChange?: (rate: number) => void;
    onPlaybackQualityChange?: (quality: string) => void;
};
type YTPlayerState = {
    PLAYING: number;
    PAUSED: number;
    BUFFERING: number;
    ENDED: number;
};
interface YTPlayer {
    loadVideoById: (opts: {
        videoId: string;
    }) => void;
    playVideo: () => void;
    pauseVideo: () => void;
    seekTo: (seconds: number, allowSeekAhead: boolean) => void;
    setPlaybackRate: (rate: number) => void;
    setVolume: (volume: number) => void;
    mute: () => void;
    unMute: () => void;
    getDuration: () => number;
    getCurrentTime: () => number;
    getVideoLoadedFraction: () => number;
    destroy: () => void;
}
interface YTNamespace {
    Player: new (el: HTMLElement, opts: unknown) => YTPlayer;
    PlayerState: YTPlayerState;
}
declare global {
    interface Window {
        YT?: YTNamespace;
        onYouTubeIframeAPIReady?: () => void;
    }
}
export declare function BaseVideoPlayer(options: BaseVideoPlayerOptions): Renderable;
export {};
