import { VideoFormat } from '../player/types';
import { WebmCodecStrategy } from '../enums/WebmCodecStrategy';
import { AndroidPreferredFormat } from '../enums/AndroidPreferredFormat';
import { Byte, type ExactVideoQuality, Milliseconds, RecursivePartial, Seconds, VideoQuality } from '@vkontakte/videoplayer-shared';
export type ITuningConfig = {
    configName: string[];
    throughputEstimator: {
        type: 'TwoEma' | 'EmaAndMa';
        emaAlphaSlow: number;
        emaAlphaFast: number;
        emaAlpha: number;
        basisTrendChangeCount: number;
        changeThreshold: number;
        useBrowserEstimation: boolean;
        rttPenaltyRequestSize: Byte;
        streamMinSampleSize: Byte;
        streamMinSampleTime: Milliseconds;
        deviationDepth: number;
        deviationFactor: number;
        lowLatency: {
            continuesByteSequenceInterval: Milliseconds;
            maxLastEvaluationTimeout: Milliseconds;
        };
    };
    autoTrackSelection: {
        bitrateFactorAtEmptyBuffer: number;
        minBitrateFactorAtEmptyBuffer: number;
        maxBitrateFactorAtEmptyBuffer: number;
        bitrateAudioFactorAtEmptyBuffer: number;
        bitrateFactorAtFullBuffer: number;
        minBitrateFactorAtFullBuffer: number;
        maxBitrateFactorAtFullBuffer: number;
        bitrateAudioFactorAtFullBuffer: number;
        minVideoAudioRatio: number;
        minAvailableThroughputAudioRatio: number;
        limitByContainer: boolean;
        usePixelRatio: boolean;
        /** @deprecated */
        pixelRatioMultiplier?: number;
        pixelRatioLogBase: number;
        pixelRatioLogCoefficients: number[];
        containerSizeFactor: number;
        minContainerSizeFactor: number;
        maxContainerSizeFactor: number;
        lazyQualitySwitch: boolean;
        minBufferToSwitchUp: number;
        considerPlaybackRate: boolean;
        trackCooldownIncreaseQuality: Milliseconds;
        trackCooldownDecreaseQuality: Milliseconds;
        backgroundVideoQualityLimit: VideoQuality;
        activeVideoAreaThreshold: number;
        trafficSavingLimit: ExactVideoQuality;
        highQualityLimit: ExactVideoQuality;
    };
    stallsManager: {
        enabled: boolean;
        stallDurationNoDataBeforeQualityDecrease: Milliseconds;
        stallDurationToBeCount: Milliseconds;
        stallCountBeforeQualityDecrease: Milliseconds;
        resetQualityRestrictionTimeout: Milliseconds;
        ignoreStallsOnSeek: boolean;
        stallsMetricsHistoryLength: number;
        maxPossibleStallDuration: Milliseconds;
        minTvtToBeCounted: Seconds;
        maxTvtToBeCounted: Seconds;
        targetStallsDurationPerTvt: number;
        deviationStallsDurationPerTvt: number;
        criticalStallsDurationPerTvt: number;
        abrAdjustingSpeed: number;
        emaAlpha: number;
        useTotalStallsDurationPerTvt: boolean;
        useAverageStallsDurationPerTvt: boolean;
        useEmaStallsDurationPerTvt: boolean;
    };
    droppedFramesChecker: {
        enabled: boolean;
        percentLimit: number;
        checkTime: number;
        countLimit: number;
        tickCountAfterQualityChange: number;
        qualityUpWaitingTime: number;
        minQualityBanLimit: ExactVideoQuality;
    };
    dash: {
        /** @deprecated */
        forwardBufferTarget: Milliseconds;
        forwardBufferTargetAuto: Milliseconds;
        forwardBufferTargetManual: Milliseconds;
        forwardBufferTargetPreload: Milliseconds;
        seekBiasInTheEnd: Milliseconds;
        maxSegmentDurationLeftToSelectNextSegment: Milliseconds;
        minSafeBufferThreshold: number;
        bufferPruningSafeZone: Milliseconds;
        segmentRequestSize: Byte;
        representationSwitchForwardBufferGap: Milliseconds;
        crashOnStallTimeout: Milliseconds;
        crashOnStallTWithoutDataTimeout: Milliseconds;
        enableSubSegmentBufferFeeding: boolean;
        bufferEmptinessTolerance: Milliseconds;
        useFetchPriorityHints: boolean;
        enableBaseUrlSupport: boolean;
        maxSegmentRetryCount: number;
        sourceOpenTimeout: number;
        vktvAbrThrottle: number;
        timeupdateEventTickThrottle: number;
    };
    dashCmafLive: {
        maxActiveLiveOffset: Milliseconds;
        normalizedTargetMinBufferSize: Milliseconds;
        normalizedLiveMinBufferSize: Milliseconds;
        normalizedActualBufferOffset: Milliseconds;
        offsetCalculationError: Milliseconds;
        maxLiveDuration: Seconds;
        lowLatency: {
            maxTargetOffset: Milliseconds;
            maxTargetOffsetDeviation: Milliseconds;
            playbackCatchupSpeedup: number;
            isActiveOnDefault: boolean;
            bufferEstimator: {
                emaAlpha: number;
                changeThreshold: number;
                deviationDepth: number;
                deviationFactor: number;
                extremumInterval: number;
            };
        };
    };
    downloadBackoff: {
        bufferThreshold: Milliseconds;
        start: Milliseconds;
        factor: number;
        max: Milliseconds;
        random: number;
    };
    live: {
        minBuffer: Milliseconds;
        minBufferSegments: number;
        lowLatencyMinBuffer: Milliseconds;
        lowLatencyMinBufferSegments: number;
        lowLatencyActiveLiveDelay: Milliseconds;
        activeLiveDelay: Milliseconds;
        isLiveCatchUpMode: boolean;
        /**
         * Максимальное общее время нахождения на паузе, при котором воспроизведение можно продолжить без перезагрузки потока.
         * Время всех "пауз" суммируется до тех пор, пока не превысит этот лимит.
         * В случае превышения лимита при продолжении воспроизведения поток будет перезапущен с пересчитанным `offset`.
         */
        maxPausedTime: number;
    };
    enableWakeLock: boolean;
    enableTelemetryAtStart: boolean;
    forceFormat: VideoFormat | undefined;
    formatsToAvoid: VideoFormat[];
    disableChromecast: boolean;
    chromecastReceiverId: string | undefined;
    /** @deprecated */
    useWebmBigRequest: boolean;
    webmCodec: WebmCodecStrategy;
    androidPreferredFormat: AndroidPreferredFormat;
    preferCMAF: boolean;
    preferWebRTC: boolean;
    preferMultiStream: boolean;
    preferHDR: boolean;
    bigRequestMinInitSize: Byte;
    bigRequestMinDataSize: Byte;
    stripRangeHeader: boolean;
    flushShortLoopedBuffers: boolean;
    insufficientBufferRuleMargin: Milliseconds;
    seekNearDurationBias: Seconds;
    dashSeekInSegmentDurationThreshold: Milliseconds;
    dashSeekInSegmentAlwaysSeekDelta: Milliseconds;
    endGapTolerance: Milliseconds;
    stallIgnoreThreshold: Milliseconds;
    gapWatchdogInterval: Milliseconds;
    requestQuick: boolean;
    /** @deprecated HLS.js удалён, флаг ничего не делает */
    useHlsJs: boolean;
    useNativeHLSTextTracks: boolean;
    useManagedMediaSource: boolean;
    useNewSwitchTo: boolean;
    useNewDashProvider: boolean;
    useNewAutoSelectVideoTrack: boolean;
    useSafariEndlessRequestBugfix: boolean;
    useRefactoredSearchGap: boolean;
    isAudioDisabled: boolean;
    autoplayOnlyInActiveTab: boolean;
    dynamicImportTimeout: Milliseconds;
    maxPlaybackTransitionInterval: Milliseconds;
    providerErrorLimit: number;
    manifestRetryInterval: number;
    manifestRetryMaxInterval: number;
    manifestRetryMaxCount: number;
    audioVideoSyncRate: number;
    webrtc: {
        connectionRetryMaxNumber: number;
    };
    spherical: {
        enabled: boolean;
        fov: {
            x: number;
            y: number;
        };
        orientation?: {
            x: number;
            y: number;
            z: number;
        };
        rotationSpeed: number;
        maxYawAngle: number;
        rotationSpeedCorrection: number;
        degreeToPixelCorrection: number;
        speedFadeTime: Milliseconds;
        speedFadeThreshold: Milliseconds;
    };
    useVolumeMultiplier: boolean;
    ignoreAudioRendererError: boolean;
    useEnableSubtitlesParam: boolean;
    useOldMSEDetection: boolean;
    useHlsLiveNewTextManager: boolean;
    exposeInternalsToGlobal: boolean;
    /**
     * за какое время до конца текущих скачанных субтитров
     * попробуем получить следующий сегмент субтитров
     */
    hlsLiveNewTextManagerDownloadThreshold: Milliseconds;
    /**
     * Отключает яндексовскую магию с пипом.
     */
    disableYandexPiP?: boolean;
    asyncResolveClientChecker?: boolean;
    autostartOnlyIfVisible?: boolean;
};
export type IOptionalTuningConfig = RecursivePartial<ITuningConfig> & {
    configName: ITuningConfig['configName'];
};
export declare const fillDefault: (partial: IOptionalTuningConfig) => ITuningConfig;
