import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { Destroyable, OmpMediaElementErrorEvent, OmpMediaElementLoadedEvent, OmpMediaElementLoadingEvent } from '../types';
import { BufferedTimespan, OmpMediaElementState } from '../video/model';
export declare const HTMLElementEvents: {
    ERROR: string;
    LOAD: string;
};
export declare const HTMLMediaElementEvents: {
    DURATIONCHANGE: string;
    ENDED: string;
    LOADEDDATA: string;
    LOADEDMETEDATA: string;
    PAUSE: string;
    PLAYING: string;
    PROGRESS: string;
    RATECHANGE: string;
    SEEKED: string;
    SEEKING: string;
    TIMEUPDATE: string;
    VOLUMECHANGE: string;
    WAITING: string;
    ERROR: string;
    LOAD: string;
};
export declare const HTMLVideoElementEvents: {
    ENTERPIP: string;
    LEAVEPIP: string;
    DURATIONCHANGE: string;
    ENDED: string;
    LOADEDDATA: string;
    LOADEDMETEDATA: string;
    PAUSE: string;
    PLAYING: string;
    PROGRESS: string;
    RATECHANGE: string;
    SEEKED: string;
    SEEKING: string;
    TIMEUPDATE: string;
    VOLUMECHANGE: string;
    WAITING: string;
    ERROR: string;
    LOAD: string;
};
export interface OmpMediaElementApi extends Destroyable {
    onLoading$: Observable<OmpMediaElementLoadingEvent>;
    onLoaded$: Observable<OmpMediaElementLoadedEvent | undefined>;
    onError$: Observable<OmpMediaElementErrorEvent>;
    loadSource(src: string): void;
    getBufferedTimespans(): BufferedTimespan[];
    getMediaElementState(): OmpMediaElementState;
}
export declare abstract class BaseOmpMediaElement<T extends HTMLMediaElement, S extends OmpMediaElementState> implements OmpMediaElementApi {
    readonly onLoading$: Subject<OmpMediaElementLoadingEvent>;
    readonly onLoaded$: BehaviorSubject<OmpMediaElementLoadedEvent | undefined>;
    readonly onError$: Subject<OmpMediaElementErrorEvent>;
    protected _mediaElement: T;
    protected readonly _id: string;
    protected _loaded: boolean;
    protected _src: string | undefined;
    protected _loadBreaker$: Subject<void>;
    protected _nextLoadBreaker$: Subject<void>;
    protected _destroyed$: Subject<void>;
    protected constructor(mediaElement: T);
    abstract getMediaElementState(): S;
    loadSource(src: string): void;
    getBufferedTimespans(): BufferedTimespan[];
    get mediaElement(): T;
    destroy(): void;
}
export interface OmpMediaElementConfig {
}
export interface OmpAudioElementConfig extends OmpMediaElementConfig {
    loop?: boolean;
    crossOrigin?: string | undefined;
}
export declare class OmpAudioElement extends BaseOmpMediaElement<HTMLAudioElement, OmpMediaElementState> {
    constructor(config?: OmpAudioElementConfig);
    getMediaElementState(): OmpMediaElementState;
}
