/** * Since we conditionally import HLS.JS from a script tag (to avoid unnecessarily blowing up the bundle size), * we don't have access to the library types and we need to add them manually. If you need to use more methods, * refer to the documentation: https://github.com/video-dev/hls.js/blob/master/docs/API.md */ declare namespace HlsJs { class Hls { constructor(); attachMedia(media: HTMLMediaElement): void; detachMedia(): void; destroy(): void; loadSource(source: string): void; media?: HTMLMediaElement; on( event: string, callback: (event: string, data: unknown & { details?: string }) => void ): void; url?: string; } namespace Events { const ERROR: string; const MEDIA_ATTACHED: string; } } declare const Hls: { new (): HlsJs.Hls; isSupported(): boolean; Events: typeof HlsJs.Events; };