import { IMediaDetails } from '@annoto/widget-api';
import { PipPluginOptions, PipPluginUI, PipPlugin } from './plugins/pip';
import { LayoutPluginOptions, LayoutParams, LayoutPlugin } from './plugins/layout';
import { TimeCutPluginOptions, TimeCut, TimeCutPlugin } from './plugins/time-cut';
import videojs, { VideoJsPlayerOptions, VideoJsPlayer } from 'video.js';
export type PlayerAspectRatio = '239:100' | '16:9' | '16:10' | '4:3' | '100:239' | '9:16' | '10:16' | '3:4' | 'auto';
export interface PlayerOptions extends VideoJsPlayerOptions {
    playbackRates?: number[];
    playsinline?: boolean;
    crossorigin?: 'anonymous' | 'use-credentials';
    youtube?: {
        techParams?: {
            [key: string]: number | string;
        };
        enablePrivacyEnhancedMode?: boolean;
    };
    vimeo?: {
        techParams?: {
            [key: string]: boolean | number | string;
        };
        enablePrivacyEnhancedMode?: boolean;
    };
    aspectRatio?: PlayerAspectRatio;
    plugins?: {
        pip?: PipPluginOptions;
        layout?: LayoutPluginOptions;
        timeCut?: TimeCutPluginOptions;
    };
    features?: {
        pip?: boolean;
        layout?: boolean;
        timeCut?: boolean;
    };
    html5?: {
        hls?: {
            overrideNative?: boolean;
            useCueTags?: boolean;
            withCredentials?: boolean;
            blacklistDuration?: number;
            bandwidth?: number;
            enableLowInitialPlaylist?: boolean;
            limitRenditionByPlayerDimensions?: boolean;
            smoothQualityChange?: boolean;
        };
    };
}
export type TextTrackKind = videojs.TextTrack.Kind;
export type TextTrackMode = videojs.TextTrack.Mode;
export interface TextTrackOptions {
    kind: TextTrackKind;
    mode?: TextTrackMode;
    language?: string;
    src?: string;
    default?: boolean;
}
export type PlayerEvent = 'play' | 'pause' | 'seeked' | 'seeking' | 'timeupdate' | 'fullscreenchange' | 'ratechange' | 'volumechange' | 'loadedmetadata' | 'durationchange' | 'progress' | 'waiting' | 'playing' | 'loadstart';
export type PlayerEventCallback = (arg?: any) => void;
export type VideoType = 'video/mp4' | 'video/webm' | 'video/youtube' | 'video/vimeo' | 'application/x-mpegURL';
export interface SourceObject {
    src: string;
    type?: VideoType;
    poster?: string;
    aspectRatio?: PlayerAspectRatio;
    startTime?: number | string;
    layout?: LayoutParams;
    timeCut?: TimeCut;
    chaptersTrack?: string;
    ccTrack?: string;
    mediaDetails?: IMediaDetails;
}
export interface SecondarySourceObject {
    src: string;
    type?: VideoType;
    aspectRatio?: PlayerAspectRatio;
    startTime?: number | string;
    layout?: LayoutParams;
    ui?: PipPluginUI;
}
export type AudioSource = 'primary' | 'secondary';
export interface PlayerImplementation extends VideoJsPlayer {
    videojs?: any;
    pip(options?: PipPluginOptions): PipPlugin;
    layout(options?: LayoutPluginOptions): LayoutPlugin;
    timeCut(option?: TimeCutPluginOptions): TimeCutPlugin;
    crossOrigin(val: string): string | undefined;
    crossOrigin(): string | undefined;
}
