import { IError, IRange, ISubject, Milliseconds } from '@vkontakte/videoplayer-shared';
export declare class NativeBufferManager {
    error$: ISubject<IError>;
    private mediaSource;
    private sourceBuffer;
    private sourceBufferTaskQueue;
    private subscription;
    constructor(mediaSource: MediaSource);
    init(mime: string, codecs: string, useAbortMSEFix?: boolean): void;
    addInitSegment(initView: BufferSource, signal?: AbortSignal): Promise<boolean>;
    append(segmentView: BufferSource, signal?: AbortSignal): Promise<boolean>;
    remove(from: Milliseconds, to: Milliseconds, signal?: AbortSignal): Promise<boolean>;
    clear(signal?: AbortSignal): Promise<boolean>;
    warmUpMediaSource(): void;
    getBufferState(): IRange<Milliseconds>[] | null;
    getForwardBufferDuration(currentPosition: Milliseconds | undefined): Milliseconds;
    abortBuffer(init: ArrayBuffer | undefined): Promise<boolean>;
    destroy(): void;
}
