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; onLoaded$: Observable; onError$: Observable; loadSource(src: string): void; getBufferedTimespans(): BufferedTimespan[]; getMediaElementState(): OmpMediaElementState; } export declare abstract class BaseOmpMediaElement implements OmpMediaElementApi { readonly onLoading$: Subject; readonly onLoaded$: BehaviorSubject; readonly onError$: Subject; protected _mediaElement: T; protected readonly _id: string; protected _loaded: boolean; protected _src: string | undefined; protected _loadBreaker$: Subject; protected _nextLoadBreaker$: Subject; protected _destroyed$: Subject; 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 { constructor(config?: OmpAudioElementConfig); getMediaElementState(): OmpMediaElementState; }