import type { TimeRange } from '../../stream-data-structure/track/TrackAtom';
import type { BufferApi } from '../apis/BufferApi';
import type { DrmApi } from '../apis/DrmApi';
import type { ManifestApi } from '../apis/ManifestApi';
import type { LogLevel, MetadataType, PlayerEvent, PlayerExports, PlayerType, StreamType, SupportedTechnologyMode, TimeMode, ViewMode } from '../enums/PlayerExports';
import type { AdvertisingConfig } from './AdvertisingConfig';
import type { NetworkConfig } from './NetworkConfig';
import type { AdaptationPlatformConfig, AnalyticsConfig, BufferConfig, CastConfig, EventConfig, GoogleCastRemoteControlConfig, LicensingConfig, LiveConfig, LocationConfig, LogsConfig, PlaybackConfig, QueryParameters, SourceConfig, StorageConfig, StyleConfig, SubtitleTrack, Technology, TweaksConfig, UIConfig, WebSocketRemoteControlConfig } from './PlayerConfig';
import type { SubtitleCueEvent } from './PlayerEventMap';
export interface Quality {
    bitrate: number;
    id: string;
    uid?: string;
    label?: string;
    codec?: string;
}
export interface PlayerEventBase {
    timestamp: number;
    type: PlayerEvent;
}
export interface PlayerEventCallback {
    (event: PlayerEventBase): void;
}
export interface MediaTrackRole {
    schemeIdUri: string;
    value?: string;
    id?: string;
    [key: string]: string | undefined;
}
export type AudioQuality = Quality;
export interface MediaTrack {
    id: string;
    label: string;
    role?: MediaTrackRole[];
}
export interface AudioTrack extends MediaTrack {
    lang: string;
    getQualities(): AudioQuality[];
}
export interface VideoQuality extends Quality {
    width: number;
    height: number;
    frameRate?: number;
}
export interface PlayerConfig {
    key: string;
    playback?: PlaybackConfig;
    style?: StyleConfig;
    events?: EventConfig;
    buffer?: BufferConfig;
    tweaks?: TweaksConfig;
    cast?: CastConfig;
    adaptation?: AdaptationPlatformConfig;
    advertising?: AdvertisingConfig;
    location?: LocationConfig;
    logs?: LogsConfig;
    licensing?: LicensingConfig;
    network?: NetworkConfig;
    remotecontrol?: GoogleCastRemoteControlConfig | WebSocketRemoteControlConfig;
    ui?: UIConfig | false;
    live?: LiveConfig;
    storage?: StorageConfig;
    analytics?: AnalyticsConfig | false;
}
export interface DownloadedData {
    id: string;
    bitrate: number;
    isAuto: boolean;
}
export type DownloadedAudioData = DownloadedData;
export interface DownloadedVideoData extends DownloadedData {
    width: number;
    height: number;
}
export interface Snapshot {
    width: number;
    height: number;
    data: string;
}
export interface Thumbnail {
    start: number;
    end: number;
    width: number;
    height: number;
    x: number;
    y: number;
    url: string;
    text: string;
}
export interface SegmentInfo {
    url: string;
    duration?: number;
    startTime?: number;
}
export interface SegmentQualityMap {
    [qualityID: string]: SegmentInfo[];
}
export interface SegmentMap {
    [mimeType: string]: SegmentQualityMap;
}
export interface ViewModeOptions {
    fullscreenElement?: HTMLElement;
}
export interface PlayerSubtitlesAPI {
    add(subtitle: SubtitleTrack): void;
    remove(subtitleID: string): void;
    list(): SubtitleTrack[];
    enable(subtitleID: string, exclusive?: boolean): void;
    disable(subtitleID: string): void;
    cueEnter(cue: SubtitleCueEvent): void;
    cueExit(cue: SubtitleCueEvent): void;
}
export interface BitmovinV8PlayerApi {
    readonly version: string;
    readonly buffer: typeof BufferApi;
    readonly manifest: typeof ManifestApi;
    readonly lowlatency: undefined;
    readonly ads: undefined;
    readonly vr: undefined;
    readonly subtitles: PlayerSubtitlesAPI;
    readonly drm: typeof DrmApi;
    readonly exports: typeof PlayerExports;
    on(eventType: PlayerEvent, callback: PlayerEventCallback): void;
    off(eventType: PlayerEvent, callback: PlayerEventCallback): void;
    destroy(): Promise<void>;
    getConfig(mergedConfig?: boolean): PlayerConfig;
    getContainer(): HTMLElement;
    getPlayerType(): PlayerType;
    load(source: SourceConfig, forceTechnology?: string, disableSeeking?: boolean): Promise<void>;
    setVideoElement(videoElement: HTMLVideoElement): void;
    getVideoElement(): HTMLVideoElement;
    setLogLevel(level: LogLevel): void;
    getCurrentTime(mode?: TimeMode): number;
    getDuration(): number;
    getPlaybackSpeed(): number;
    getTimeShift(): number;
    getVolume(): number;
    hasEnded(): boolean;
    isLive(): boolean;
    isMuted(): boolean;
    isPaused(): boolean;
    isPlaying(): boolean;
    isStalled(): boolean;
    mute(issuer?: string): void;
    pause(issuer?: string): void;
    play(issuer?: string): Promise<void>;
    getSeekableRange(): TimeRange;
    seek(time: number, issuer?: string): boolean;
    setPlaybackSpeed(speed: number): void;
    unload(): Promise<void>;
    unmute(issuer?: string): void;
    getSource(): SourceConfig | null;
    getAspectRatio(): number;
    setVolume(volume: number, issuer?: string): void;
    getBufferedRanges(): TimeRange[];
    getVideoBufferLength(): number | null;
    getAudioBufferLength(): number | null;
    addMetadata(metadataType: MetadataType.CAST, metadata: any): boolean;
    castStop(): void;
    castVideo(): void;
    clearQueryParameters(): void;
    getAudio(): AudioTrack | null;
    getAudioQuality(): AudioQuality;
    getAvailableAudio(): AudioTrack[];
    getAvailableAudioQualities(): AudioQuality[];
    getAvailableVideoQualities(): VideoQuality[];
    getDownloadedAudioData(): DownloadedAudioData;
    getDownloadedVideoData(): DownloadedVideoData;
    getDroppedVideoFrames(): number;
    getManifest(): string;
    getMaxTimeShift(): number;
    getPlaybackAudioData(): AudioQuality;
    getPlaybackVideoData(): VideoQuality;
    getSnapshot(type?: string, quality?: number): Snapshot | undefined;
    getStreamType(): StreamType;
    getSupportedDRM(): Promise<string[]>;
    getSupportedTech(mode?: SupportedTechnologyMode): Technology[];
    getThumbnail(time: number): Thumbnail | null;
    getTotalStalledTime(): number;
    getVideoQuality(): VideoQuality;
    isCastAvailable(): boolean;
    isCasting(): boolean;
    isDRMSupported(drmSystem: string): Promise<string>;
    setAspectRatio(aspectratio: string | number): void;
    setAudio(trackID: string): void;
    setAudioQuality(audioQualityID: string): void;
    setAuthentication(customData: any): void;
    setPosterImage(url: string, keepPersistent: boolean): void;
    setQueryParameters(queryParameters: QueryParameters): void;
    setVideoQuality(videoQualityID: string): void;
    timeShift(offset: number, issuer?: string): void;
    isAirplayAvailable(): boolean;
    isAirplayActive(): boolean;
    showAirplayTargetPicker(): void;
    getAvailableSegments(): SegmentMap;
    preload(): void;
    isViewModeAvailable(viewMode: ViewMode): boolean;
    setViewMode(viewMode: ViewMode, options?: ViewModeOptions): void;
    getViewMode(): ViewMode;
}
