import { IOptionalTuningConfig } from '../utils/tuningConfig';
import { IError, ILogEntry, Seconds, Subject, ValueSubject, QualityLimits, VideoQuality, ITracer } from '@vkontakte/videoplayer-shared';
import { ChromecastState, HttpConnectionType, IAudioStream, IConfig, ICueSettings, IExternalTextTrack, IPlayer, ISeekRequest, ISources, ITextTrack, IVideoStream, PlaybackRate, PlaybackState, PredefinedQualityLimits, StartEnd, Surface, VideoFormat } from './types';
export default class Player implements IPlayer {
    private subscription;
    private domContainer;
    private providerContainer?;
    private chromecastInitializer;
    private logger;
    private tracer;
    private abrLogger;
    private config;
    private tuning;
    private throughputEstimator;
    private internalsExposure;
    private isPlaybackStarted;
    private initedAt;
    private hasLiveOffsetByPaused;
    private hasLiveOffsetByPausedTimer;
    private playerInitRequest;
    private playerInited;
    private explicitInitialQuality;
    private wasSetStartedQuality;
    private desiredState;
    info: {
        playbackState$: ValueSubject<PlaybackState | undefined>;
        position$: ValueSubject<number>;
        duration$: ValueSubject<number>;
        muted$: ValueSubject<boolean>;
        volume$: ValueSubject<number>;
        availableVideoStreams$: ValueSubject<IVideoStream[]>;
        currentVideoStream$: ValueSubject<IVideoStream | undefined>;
        availableQualities$: ValueSubject<VideoQuality[]>;
        availableQualitiesFps$: ValueSubject<Partial<Record<VideoQuality, number>>>;
        currentQuality$: ValueSubject<VideoQuality | undefined>;
        isAutoQualityEnabled$: ValueSubject<boolean>;
        autoQualityLimitingAvailable$: ValueSubject<boolean>;
        autoQualityLimits$: ValueSubject<QualityLimits>;
        predefinedQualityLimitType$: ValueSubject<PredefinedQualityLimits>;
        availableAudioStreams$: ValueSubject<IAudioStream[]>;
        currentAudioStream$: ValueSubject<IVideoStream | undefined>;
        availableAudioTracks$: ValueSubject<import("./types").IBaseTrack[]>;
        isAudioAvailable$: ValueSubject<boolean>;
        currentPlaybackRate$: ValueSubject<number>;
        currentBuffer$: ValueSubject<StartEnd<number>>;
        isBuffering$: ValueSubject<boolean>;
        isStalled$: ValueSubject<boolean>;
        isEnded$: ValueSubject<boolean>;
        isLooped$: ValueSubject<boolean>;
        isLive$: ValueSubject<boolean | undefined>;
        isLiveEnded$: ValueSubject<boolean | null>;
        canChangePlaybackSpeed$: ValueSubject<boolean | undefined>;
        atLiveEdge$: ValueSubject<boolean | undefined>;
        atLiveDurationEdge$: ValueSubject<boolean | undefined>;
        liveTime$: ValueSubject<number | undefined>;
        liveBufferTime$: ValueSubject<number | undefined>;
        liveLatency$: ValueSubject<number | undefined>;
        currentFormat$: ValueSubject<VideoFormat | undefined>;
        availableTextTracks$: ValueSubject<ITextTrack[]>;
        currentTextTrack$: ValueSubject<string | undefined>;
        throughputEstimation$: ValueSubject<number | undefined>;
        rttEstimation$: ValueSubject<number | undefined>;
        videoBitrate$: ValueSubject<number | undefined>;
        hostname$: ValueSubject<string | undefined>;
        httpConnectionType$: ValueSubject<HttpConnectionType | undefined>;
        httpConnectionReused$: ValueSubject<boolean | undefined>;
        surface$: ValueSubject<Surface>;
        chromecastState$: ValueSubject<ChromecastState>;
        chromecastDeviceName$: ValueSubject<string | undefined>;
        intrinsicVideoSize$: ValueSubject<{
            width: number;
            height: number;
        } | undefined>;
        availableSources$: ValueSubject<ISources | undefined>;
        is3DVideo$: ValueSubject<boolean>;
        currentVideoSegmentLength$: ValueSubject<number>;
        currentAudioSegmentLength$: ValueSubject<number>;
    };
    events: {
        inited$: Subject<void>;
        ready$: Subject<void>;
        started$: Subject<void>;
        playing$: Subject<void>;
        paused$: Subject<void>;
        stopped$: Subject<void>;
        willStart$: Subject<void>;
        willResume$: Subject<void>;
        willPause$: Subject<void>;
        willStop$: Subject<void>;
        willDestruct$: Subject<void>;
        watchCoverageRecord$: Subject<StartEnd<number>>;
        watchCoverageLive$: Subject<StartEnd<number>>;
        managedError$: Subject<IError>;
        fatalError$: Subject<IError>;
        fetcherRecoverableError$: Subject<IError>;
        ended$: Subject<void>;
        looped$: Subject<number>;
        seeked$: Subject<void>;
        willSeek$: Subject<ISeekRequest>;
        autoplaySoundProhibited$: Subject<void>;
        firstBytes$: Subject<number>;
        loadedMetadata$: Subject<void>;
        firstFrame$: Subject<number>;
        canplay$: Subject<number>;
        log$: Subject<ILogEntry>;
        fetcherError$: Subject<IError>;
        severeStallOccured$: Subject<boolean>;
    };
    experimental: {
        element$: ValueSubject<HTMLVideoElement | undefined>;
        tuningConfigName$: ValueSubject<string[]>;
        enableDebugTelemetry$: ValueSubject<boolean>;
        dumpTelemetry: (receiver: (value: Record<string, any>) => void) => void;
        getCurrentTime$: ValueSubject<null>;
    };
    constructor(tuning?: IOptionalTuningConfig, tracer?: ITracer);
    initVideo(config: IConfig): IPlayer;
    destroy(): void;
    prepare(): IPlayer;
    play(): IPlayer;
    pause(): IPlayer;
    stop(): IPlayer;
    seekTime(time: Seconds, forcePrecise?: boolean): IPlayer;
    /**
     * NOTE: Сейчас вызов `seekPercent` до получения `duration` не сработает.
     * @param percent: number [0, 1];
     */
    seekPercent(percent: number): IPlayer;
    setVolume(percent: number, desiredMuted?: boolean): IPlayer;
    setMuted(muted: boolean): IPlayer;
    setVideoStream(stream: IVideoStream): IPlayer;
    setAudioStream(stream: IAudioStream): IPlayer;
    setQuality(quality: VideoQuality): IPlayer;
    setAutoQuality(enable: boolean): IPlayer;
    setAutoQualityLimits(limits: QualityLimits): IPlayer;
    setPredefinedQualityLimits(type: PredefinedQualityLimits): this;
    setPlaybackRate(playbackRate: PlaybackRate): IPlayer;
    setExternalTextTracks(tracks: Omit<IExternalTextTrack, 'type'>[]): IPlayer;
    selectTextTrack(id: ITextTrack['id'] | undefined): IPlayer;
    setTextTrackCueSettings(settings: ICueSettings): IPlayer;
    setLiveLowLatency(isLowLatency: boolean): IPlayer;
    setLooped(isLooped: boolean): IPlayer;
    toggleChromecast(): void;
    /**
     * Starts 3D-camera constant rotation
     * Base rotation speed is provided through the tuning config
     *
     * @param mx - camera X rotation speed multiplier
     * @param my - camera Y rotation speed multiplier
     *
     * 1 - positive direction
     * 0.5 - half speed in positive direction
     * 0 - no rotation
     * -1 negative direction
     * -2 double speed in negative direction
     *
     * Limitations:
     *    When camera reaches angles 180 or -180 in vertical direction it stops.
     *    z-axis is frozen for now
     *
     * Set all zeroes to stop the camera rotation
     *    startCameraManualRotation(0, 0);
     */
    startCameraManualRotation(mx: number, my: number): this;
    /**
     * Rotates 3d-camera to given angles relative to current position
     */
    stopCameraManualRotation(immediate?: boolean): this;
    /**
     * Rotates 3d-camera to given angles relative to current position
     * using mouse deltas and scene fov
     */
    moveCameraFocusPX(dxpx: number, dypx: number): this;
    /**
     * "Holds" camera so that it can not perform movement without manual control
     */
    holdCamera(): this;
    /**
     * "Releases" the camera so that it can move using its internal logic
     */
    releaseCamera(): this;
    getExactTime(): Seconds;
    getAllLogs(): ILogEntry[];
    private getScene3D;
    private setIntrinsicVideoSize;
    private initDesiredStateSubscriptions;
    private initProviderContainerSubscription;
    private initChromecastSubscription;
    private initStartingVideoTrack;
    private setStartingVideoTrack;
    private initLogs;
    private initDebugTelemetry;
    private initTracerSubscription;
    private initWakeLock;
    private setVideoTrackIdByQuality;
    private getActiveLiveDelay;
    private isNotActiveTabCase;
}
