import { HttpConnectionType } from '../../../player/types';
import type ThroughputEstimator from '../../../utils/ThroughputEstimator';
import { Byte, IValueSubject, Milliseconds, IRange, Subject, ITracer, IError } from '@vkontakte/videoplayer-shared';
import { CommonInit, GenericContainerParser, Segment, SegmentReference } from './types';
export declare enum RangeMethod {
    HEADER = 0,
    PARAM = 1
}
export interface IParams {
    throughputEstimator?: ThroughputEstimator;
    requestQuic: boolean;
    compatibilityMode?: boolean;
    tracer: ITracer;
    useEnableSubtitlesParam?: boolean;
}
export type Priority = 'high' | 'low' | 'auto';
export interface FetchParamsWithUrl extends FetchParams {
    url: string;
}
export interface FetchParams {
    range?: IRange<Byte>;
    rangeMethod?: RangeMethod;
    onProgress?: (dataView: DataView, loaded: number) => void;
    onProgressTasks?: Promise<void>[];
    signal?: AbortSignal;
    priority?: Priority;
    measureThroughput?: boolean;
    isLowLatency?: boolean;
}
export type RepresentationFetchResult = {
    init: CommonInit | null;
    segments: Segment[];
    dataView: DataView;
};
export declare class Fetcher {
    private throughputEstimator;
    private requestQuic;
    private tracer;
    lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
    lastConnectionReused$: IValueSubject<boolean | undefined>;
    lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
    recoverableError$: Subject<IError>;
    error$: Subject<IError>;
    private abortAllController;
    private subscription;
    private compatibilityMode;
    private useEnableSubtitlesParam;
    constructor({ throughputEstimator, requestQuic, tracer, compatibilityMode, useEnableSubtitlesParam }: IParams);
    private onHeadersReceived;
    fetchManifest: (param_0: string) => Promise<string | null | undefined>;
    fetch: (param_0: string, param_1: FetchParams) => Promise<ArrayBuffer | null | undefined>;
    fetchRepresentation(segmentReference: SegmentReference, parser: GenericContainerParser<unknown>, priority?: Priority): Promise<RepresentationFetchResult | null>;
    destroy(): void;
    private fetchByteRangeRepresentation;
    private fetchTemplateRepresentation;
    private doFetch;
}
export declare const suppressAbort: (e: Error | unknown) => void | never;
