import { IHLSSource, HttpConnectionType, HttpConnectionMetrics, HttpDownloadMetrics, VideoCodec } from '../../../../player/types';
import { LiveStreamStatus } from '../types';
import { CommonInit, Manifest, Representation, StreamKind, TextRepresentation } from '../../../../providers/utils/parsers/types';
import StateMachine from '../../../../utils/StateMachine/StateMachine';
import type ThroughputEstimator from '../../../../utils/ThroughputEstimator';
import { ITuningConfig } from '../../../../utils/tuningConfig';
import { IError, IRange, ISubject, ISubscription, ITracer, IValueSubject, Milliseconds, Nullable, Seconds, Subject, Subscription, SubscriptionRemovable } from '@vkontakte/videoplayer-shared';
import { Fetcher } from '../fetcher';
import { Dependencies, IVirtualBufferManager } from '../../../../providers/DashProviderVirtual/lib/buffer/types';
import { Params, State } from '../../../../providers/DashProviderVirtual/lib/player/types';
import { NativeBufferManager } from '../../../../providers/DashProviderVirtual/lib/buffer/nativeBufferManager';
export declare abstract class BasePlayer {
    protected element: HTMLVideoElement | null;
    protected manifestUrlString: string;
    protected source: MediaSource | null;
    protected manifest: Manifest | null;
    protected tuning: ITuningConfig;
    protected tracer: ITracer;
    protected forceVideoCodec?: VideoCodec;
    protected videoBufferManager: IVirtualBufferManager | null;
    protected audioBufferManager: IVirtualBufferManager | null;
    protected bufferManagers: IVirtualBufferManager[];
    protected videoNativeBufferManager: NativeBufferManager | null;
    protected audioNativeBufferManager: NativeBufferManager | null;
    protected nativeBufferManagers: NativeBufferManager[];
    protected throughputEstimator: ThroughputEstimator;
    protected subscription: Subscription;
    protected subscriptionRemovable: SubscriptionRemovable;
    protected representationSubscription: Subscription;
    protected fetcher: Fetcher;
    protected forceEnded$: ISubject<void>;
    protected stallWatchdogSubscription: ISubscription | undefined;
    protected destroyController: AbortController;
    state$: StateMachine<State>;
    currentVideoRepresentation$: IValueSubject<Representation['id'] | undefined>;
    currentVideoRepresentationInit$: IValueSubject<CommonInit | undefined>;
    currentAudioRepresentation$: IValueSubject<Representation['id'] | undefined>;
    currentVideoSegmentLength$: IValueSubject<number>;
    currentAudioSegmentLength$: IValueSubject<number>;
    error$: ISubject<IError>;
    manifestRequested: ISubject<void>;
    manifestReceived: ISubject<void>;
    firstBytesRequested: ISubject<void>;
    firstBytesReceived: ISubject<void>;
    lastConnectionType$: IValueSubject<HttpConnectionType | undefined>;
    lastConnectionReused$: IValueSubject<boolean | undefined>;
    lastRequestFirstBytes$: IValueSubject<Milliseconds | undefined>;
    lastConnectionMetrics$: IValueSubject<HttpConnectionMetrics | undefined>;
    lastDownloadMetrics$: IValueSubject<HttpDownloadMetrics | undefined>;
    currentLiveTextRepresentation$: IValueSubject<TextRepresentation | null>;
    private timeoutSourceOpenId;
    isLive$: IValueSubject<boolean>;
    isActiveLive$: IValueSubject<boolean>;
    isLowLatency$: IValueSubject<boolean>;
    liveDuration$: IValueSubject<Milliseconds>;
    liveSeekableDuration$: IValueSubject<Milliseconds>;
    liveAvailabilityStartTime$: IValueSubject<Milliseconds>;
    liveStreamStatus$: IValueSubject<LiveStreamStatus | undefined>;
    currentBuffer$: IValueSubject<IRange<Seconds>>;
    bufferLength$: IValueSubject<Milliseconds>;
    nativeBufferLength$: IValueSubject<Milliseconds>;
    liveLatency$: IValueSubject<Milliseconds | undefined>;
    liveLoadBufferLength$: IValueSubject<Milliseconds>;
    livePositionFromPlayer$: IValueSubject<number>;
    currentStallDuration$: IValueSubject<Milliseconds>;
    videoLastDataObtainedTimestamp$: IValueSubject<Milliseconds>;
    fetcherRecoverableError$: Subject<IError>;
    fetcherError$: Subject<IError>;
    protected constructor(params: Params);
    protected abstract prepareManifestUrlString(manifestBaseUrlString: string, offset: number): string;
    protected abstract setSourceDuration(): void;
    protected abstract restoreAfterDeepStall(stallTraceAttributes: Record<string, number>): Promise<void>;
    initRepresentations: (param_0: string, param_1: string | undefined, param_2: import("../../../../player/types").URLSource | undefined) => Promise<void | undefined>;
    initManifest(element: HTMLVideoElement, manifestBaseUrlString: string, offset: number): Promise<void>;
    initBuffer(): void;
    switchRepresentation(kind: StreamKind, id: Representation['id'], isAuto?: boolean): Promise<void>;
    seek(requestedPosition: Milliseconds, forcePrecise?: boolean): Promise<void>;
    warmUpMediaSourceIfNeeded(position?: Milliseconds | undefined): void;
    calculateDurationFromSegments(representationId: Representation['id']): Milliseconds;
    get isStreamEnded(): boolean;
    getStreams(): Manifest['streams'] | undefined;
    getCodecs(): Manifest['codecs'] | undefined;
    setBufferTarget(time: Milliseconds): void;
    setPreloadOnly(preloadOnly: boolean): void;
    stop(): void;
    destroy(): void;
    protected get isStreamNotOpen(): boolean;
    protected reinitDecoderIfNeeded(force?: boolean): Promise<void>;
    protected stallWatchdogIntervalCallback(): Promise<void>;
    protected isStallExceeded(timeInWaiting: Milliseconds): boolean;
    protected updateManifest(): Promise<Manifest | null>;
    protected fetchManifest: () => Promise<Nullable<string>>;
    protected parseManifest(manifestString: string): Nullable<Manifest>;
    protected getResultManifest(manifest: Manifest): Manifest;
    protected stopStallWatchdogSubscription(): void;
    protected createBuffers(dependencies: Dependencies, initialVideo: Representation['id'], initialAudio?: Representation['id'], sourceHls?: IHLSSource): void;
    protected waitStreamToOpen(): Promise<void>;
    protected initRepresentationSubscriptions(): void;
    protected initBufferLengthSubscription(): void;
    protected initTracerSubscription(): void;
    protected tick(): Promise<void>;
}
