UNPKG

@aidenlx/player

Version:

Headless web components that make integrating media on the a web a breeze.

19 lines 1.2 kB
import type { Events as HlsEvent } from 'hls.js'; import type { DynamicHlsConstructorImport, HlsConstructor } from './types'; export declare function isHlsConstructorCached(src: string): boolean; export declare type HlsConstructorLoadCallbacks = { onLoadStart?: () => void; onLoaded?: (ctor: HlsConstructor) => void; onLoadError?: (err: Error) => void; }; export declare function importHlsConstructor(importer: HlsConstructor | DynamicHlsConstructorImport | undefined, callbacks?: HlsConstructorLoadCallbacks): Promise<HlsConstructor | undefined>; /** * Loads `hls.js` from the remote source given via `hlsLibrary` into the window namespace. This * is because `hls.js` in {currentYear} still doesn't provide a ESM export. This method will * return `undefined` if it fails to load the script. Listen to `vds-hls-lib-load-error` to be * notified of any failures. */ export declare function loadHlsConstructorScript(src: unknown, callbacks?: HlsConstructorLoadCallbacks): Promise<HlsConstructor | undefined>; export declare function vdsToHlsEventType(type: string): string; export declare function isHlsEventType(type: string): type is HlsEvent; //# sourceMappingURL=utils.d.ts.map