import type { LogLevel, PlayerType, StreamType, TransitionTimingType, VRContentType } from '../enums/PlayerExports';
import type { AdvertisingConfig } from './AdvertisingConfig';
import type { DRMConfig } from './DrmConfig';
import type { NetworkConfig } from './NetworkConfig';
import type { PlayerEventCallback, MediaTrack } from './Types';
export interface ProgressiveSourceConfig {
    url: string;
    type?: string;
    bitrate?: number;
    preferred?: boolean;
    label?: string;
}
export interface HttpHeaders {
    [fieldName: string]: string;
}
export interface SourceConfigOptions {
    manifestWithCredentials?: boolean;
    withCredentials?: boolean;
    hlsManifestWithCredentials?: boolean;
    hlsWithCredentials?: boolean;
    dashManifestWithCredentials?: boolean;
    dashWithCredentials?: boolean;
    persistentPoster?: boolean;
    startTime?: number;
    startOffset?: number;
    startOffsetTimelineReference?: TimelineReferencePoint;
    audioCodecPriority?: string[];
    videoCodecPriority?: string[];
    headers?: HttpHeaders;
    shouldRecreateSourceBuffersOnPeriodSwitch?: (sourcePeriodInfo: PeriodInformation, targetPeriodInfo: PeriodInformation, suggestion: boolean) => boolean;
}
export interface PeriodInformation {
    periodId: string;
    contentInformation: PeriodContentInformation[];
}
export interface PeriodContentInformation {
    codec: string;
    mimeType: string;
    isDrmProtected: boolean;
}
export declare enum TimelineReferencePoint {
    Start = "start",
    End = "end",
    CurrentTime = "currenttime"
}
export interface ThumbnailTrack {
    url: string;
}
export interface TrackMetadata {
    id?: string;
    mimeType?: string;
    lang: string;
}
export interface QualityMetadata {
    id: string;
    mimeType: string;
    bitrate: number;
    width: number;
    height: number;
    qualityRanking?: number;
    frameRate?: number;
}
export interface SubtitleTrack extends TextTrack {
    enabled?: boolean;
    forced?: boolean;
}
export interface TextTrack extends MediaTrack {
    lang: string;
    kind: string;
    isFragmented?: boolean;
    isSideloaded?: boolean;
    url?: string;
}
export interface SourceLabelingConfig {
    tracks?: (track: TrackMetadata) => string;
    qualities?: (quality: QualityMetadata) => string;
    subtitles?: (subtitle: SubtitleTrack) => string;
}
export interface SourceConfig {
    dash?: string;
    hls?: string;
    progressive?: string | ProgressiveSourceConfig[];
    smooth?: string;
    whep?: string;
    poster?: string;
    drm?: DRMConfig;
    options?: SourceConfigOptions;
    subtitleTracks?: SubtitleTrack[];
    thumbnailTrack?: ThumbnailTrack;
    vr?: VRConfig;
    title?: string;
    description?: string;
    labeling?: SourceLabelingStreamTypeConfig;
    analytics?: AnalyticsConfig;
    metadata?: {
        [key: string]: string;
    };
}
export interface VRViewingWindowConfig {
    minYaw: number;
    maxYaw: number;
    minPitch: number;
    maxPitch: number;
}
export interface VRControlConfig {
    transitionTimingType?: TransitionTimingType;
    transitionTime?: number;
    maxDisplacementSpeed?: number;
}
export interface KeyMap {
    up?: string[];
    down?: string[];
    left?: string[];
    right?: string[];
    rotateClockwise?: string[];
    rotateCounterclockwise?: string[];
}
export interface VRKeyboardControlConfig extends VRControlConfig {
    keyMap?: KeyMap;
}
export interface VRConfig {
    contentType: VRContentType;
    stereo?: boolean;
    startPosition?: number;
    contentFieldOfView?: number;
    verticalFieldOfView?: number;
    horizontalFieldOfView?: number;
    viewingWindow?: VRViewingWindowConfig;
    restrictedInlinePlayback?: boolean;
    enableFrameRateMeasurements?: boolean;
    cardboard?: string;
    viewingDirectionChangeThreshold?: number;
    viewingDirectionChangeEventInterval?: number;
    keyboardControl?: VRKeyboardControlConfig;
    mouseControl?: VRControlConfig;
    apiControl?: VRControlConfig;
}
export interface Technology {
    player: PlayerType;
    streaming: StreamType;
}
export interface SourceLabelingStreamTypeConfig {
    dash?: SourceLabelingConfig;
    hls?: SourceLabelingConfig;
}
export interface PreferredTechnology extends Technology {
    exclude?: boolean;
}
export interface PlaybackConfig {
    autoplay?: boolean;
    muted?: boolean;
    volume?: number;
    audioLanguage?: string | string[];
    subtitleLanguage?: string | string[];
    isForcedSubtitle?: (subtitle: SubtitleTrack) => boolean;
    timeShift?: boolean;
    seeking?: boolean;
    playsInline?: boolean;
    preferredTech?: PreferredTechnology[];
    audioCodecPriority?: string[];
    videoCodecPriority?: string[];
}
export interface StyleConfig {
    width?: string;
    height?: string;
    aspectratio?: string | number;
    container?: () => HTMLElement;
    nativeSubtitles?: boolean;
}
export interface BufferMediaTypeConfig {
    forwardduration?: number;
    backwardduration?: number;
}
export interface BufferConfig {
    video?: BufferMediaTypeConfig;
    audio?: BufferMediaTypeConfig;
}
export interface QueryParameters {
    [name: string]: string;
}
export interface ResponseStatusMap {
    [name: string]: number[];
}
export interface PlayStation5Tweaks {
    playmode?: '4K' | '2K';
    pass_through?: boolean;
    esvm?: boolean;
}
export interface TweaksConfig {
    [key: string]: any;
    max_buffer_level?: number;
    startup_threshold?: number;
    restart_threshold?: number;
    query_parameters?: QueryParameters;
    native_hls_parsing?: boolean;
    native_hls_download_error_handling?: boolean;
    stop_download_on_pause?: boolean;
    log_level?: LogLevel;
    licenseServer?: string;
    impressionServer?: string;
    hls_audio_only_threshold_bitrate?: number;
    segmentLoader?: any;
    segmentLoaderArgs?: any;
    file_protocol?: boolean;
    app_id?: string;
    adaptation_set_switching_without_supplemental_property?: boolean;
    ignore_mp4_edts_box?: boolean;
    ignore_hls_audio_groups?: boolean;
    disable_retry_for_response_status?: ResponseStatusMap;
    live_segment_list_start_index_offset?: number;
    prevent_video_element_preloading?: boolean;
    serviceworker_scope?: string;
    fairplay_ignore_duplicate_init_data_key_errors?: boolean;
    no_quota_exceeded_adjustment?: boolean;
    segment_encryption_transition_handling?: boolean;
    enable_seek_for_live?: boolean;
    resume_live_content_at_previous_position_after_ad_break?: boolean;
    dword_base_media_decode_timestamps?: boolean;
    force_base_media_decode_time_rewrite?: boolean;
    akamai_datetime_parsing?: boolean;
    clear_buffers_on_seeking_backwards?: boolean;
    drop_invalid_segments?: boolean;
    preserve_gaps_for_base_media_decode_time_rewrite?: boolean;
    min_size_for_gap_skipping?: number;
    force_software_decryption?: boolean;
    max_retries?: number;
    max_cdn_retries?: number;
    max_mpd_retries?: number;
    mpd_retry_delay?: number;
    mpd_update_period_tolerance?: number;
    parse_cea_708_caption?: boolean;
    playstation_5?: PlayStation5Tweaks;
    hls_sync_segment_playback_time_via_media_sequence?: boolean;
    hls_parse_manifest_in_worker?: boolean;
    hls_clear_buffers_on_discontinuity_switches?: boolean;
    parse_emsg_boxes?: boolean;
}
export interface CastConfig {
    enable?: boolean;
    application_id?: string;
    message_namespace?: string;
    receiverStylesheetUrl?: string;
}
export declare enum AdaptationLogicType {
    BUFFER = "v1",
    BUFFER_FILL_RATE = "v2",
    DOWNLOAD_PREDICTION = "v3"
}
export declare enum RttEstimationMethod {
    WeightedAverage = "weightedaverage",
    Median = "median"
}
export interface AdaptationConfig {
    limitToPlayerSize?: boolean;
    startupBitrate?: Bitrate;
    maxStartupBitrate?: Bitrate;
    disableDownloadCancelling?: boolean;
    preload?: boolean;
    exclude?: boolean;
    bitrates?: BitrateLimitationConfig;
    resolution?: VideoSizeLimitationConfig;
    qualityThreshold?: number;
    qualityUpperThreshold?: number;
    logic?: AdaptationLogicType;
    onVideoAdaptation?: (data: VideoAdaptationData) => string;
    onAudioAdaptation?: (data: AudioAdaptationData) => string;
    rttEstimationMethod?: RttEstimationMethod;
}
interface AdaptationData {
    suggested: string;
    isAd: boolean;
    representations: {
        bandwidth: number;
        id: string;
    }[];
}
export type VideoAdaptationData = AdaptationData;
export type AudioAdaptationData = AdaptationData;
export interface BitrateLimitationConfig {
    minSelectableAudioBitrate?: Bitrate;
    maxSelectableAudioBitrate?: Bitrate;
    minSelectableVideoBitrate?: Bitrate;
    maxSelectableVideoBitrate?: Bitrate;
}
export interface VideoSizeLimitationConfig {
    minSelectableVideoHeight?: number;
    maxSelectableVideoHeight?: number;
    minSelectableVideoWidth?: number;
    maxSelectableVideoWidth?: number;
}
export type Bitrate = number | string;
export interface AdaptationPlatformConfig extends AdaptationConfig {
    desktop?: AdaptationConfig;
    mobile?: AdaptationConfig;
}
export interface LocationConfig {
    ui?: string;
    ui_css?: string;
    cast?: string;
    google_ima?: string;
    serviceworker?: string;
}
export type LogCallback = (logLevel: LogLevel, message: string, ...params: any[]) => void;
export interface LogsConfig {
    bitmovin?: boolean;
    level?: LogLevel;
    onLog?: LogCallback;
}
export interface LicensingConfig {
    delay?: number;
}
export interface EventConfig {
    [event: string]: PlayerEventCallback;
}
export interface RemoteControlCustomReceiverConfig {
    [key: string]: string | undefined;
    receiverStylesheetUrl?: string;
}
export interface GoogleCastRemoteControlConfig {
    type: 'googlecast';
}
export interface WebSocketRemoteControlConfig {
    type: 'websocket';
}
export interface LiveConfig {
    synchronization?: SynchronizationConfigEntry[];
    lowLatency?: LowLatencyConfig;
}
export interface StorageConfig {
    disableStorageApi?: boolean;
}
export declare enum LiveSynchronizationMethod {
    HttpHead = "httphead",
    HttpXsDate = "httpxsdate",
    HttpIso = "httpiso"
}
export interface SynchronizationConfigEntry {
    method: LiveSynchronizationMethod;
    serverUrl: string;
}
export type UIConfig = any;
export interface CollectorConfig {
    backendUrl?: string;
    enabled?: boolean;
    cookiesEnabled?: boolean;
    cookiesDomain?: string;
    origin?: string;
}
export interface AnalyticsDebugConfig {
    fields?: string[];
}
export interface AnalyticsConfig {
    debug?: boolean | AnalyticsDebugConfig;
    key?: string;
    playerKey?: string;
    player?: string;
    cdnProvider?: string;
    videoId?: string;
    title?: string;
    userId?: string;
    customUserId?: string;
    customData1?: any;
    customData2?: any;
    customData3?: any;
    customData4?: any;
    customData5?: any;
    customData6?: any;
    customData7?: any;
    customData8?: any;
    customData9?: any;
    customData10?: any;
    customData11?: any;
    customData12?: any;
    customData13?: any;
    customData14?: any;
    customData15?: any;
    customData16?: any;
    customData17?: any;
    customData18?: any;
    customData19?: any;
    customData20?: any;
    customData21?: any;
    customData22?: any;
    customData23?: any;
    customData24?: any;
    customData25?: any;
    customData26?: any;
    customData27?: any;
    customData28?: any;
    customData29?: any;
    customData30?: any;
    experimentName?: string;
    isLive?: boolean;
    config?: CollectorConfig;
}
export interface LowLatencyConfig {
    targetLatency?: number;
    catchup?: LowLatencySyncConfig;
    fallback?: LowLatencySyncConfig;
}
export interface LowLatencySyncConfig {
    playbackRateThreshold?: number;
    seekThreshold?: number;
    playbackRate?: 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 {};
