import { type Dispose } from 'maverick.js'; import type { MediaSrc } from '../../core/api/types'; import type { MediaProvider, MediaSetupContext } from '../types'; import { VideoProvider } from '../video/provider'; import type { HLSInstanceCallback, HLSLibrary } from './types'; /** * The HLS provider introduces support for HLS streaming via the popular `hls.js` * library. HLS streaming is either [supported natively](https://caniuse.com/?search=hls) (generally * on iOS), or in environments that [support the Media Stream API](https://caniuse.com/?search=mediastream). * * @docs {@link https://www.vidstack.io/docs/player/providers/hls} * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video} * @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md} * @example * ```html * * * * ``` */ export declare class HLSProvider extends VideoProvider implements MediaProvider { protected $$PROVIDER_TYPE: string; private _ctor; private readonly _controller; /** * The `hls.js` constructor. */ get ctor(): typeof import("hls.js").default | null; /** * The current `hls.js` instance. */ get instance(): import("hls.js").default | null; /** * Whether `hls.js` is supported in this environment. */ static supported: boolean; get type(): string; get canLiveSync(): boolean; protected _library: HLSLibrary; /** * The `hls.js` configuration object. * * @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning} */ get config(): Partial; set config(config: Partial); /** * The `hls.js` constructor (supports dynamic imports) or a URL of where it can be found. * * @defaultValue `https://cdn.jsdelivr.net/npm/hls.js@^1.0.0/dist/hls.min.js` */ get library(): HLSLibrary; set library(library: HLSLibrary); preconnect(): void; setup(context: MediaSetupContext): void; loadSource({ src }: MediaSrc): Promise; /** * The given callback is invoked when a new `hls.js` instance is created and right before it's * attached to media. */ onInstance(callback: HLSInstanceCallback): Dispose; destroy(): void; }