muxinc / hls-video-element

A custom element (web component) for playing HTTP Live Streaming (HLS) videos.
https://hls-video-element-mux.vercel.app
MIT License
38 stars 18 forks source link

Reexport Hls.js #35

Closed evoactivity closed 11 months ago

evoactivity commented 11 months ago

This allows consuming apps to use the underlying library without needing to add hls.js to their own dependancies, avoids version mismatches etc.

an example where you want to use Hls.Events

import HLSVideoElement, { Hls } from 'hls-video-element';

const videoElement: HLSVideoElement = document.querySelector('hls-video');
const videoElement.api?.on(Hls.Events.MEDIA_ATTACHED, () => {
  console.log('attached');
});

If #33 is merged before this, I'll add export { Hls }; to the types before this is merged.

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hls-video-element ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2023 2:42pm
evoactivity commented 11 months ago

This should be ready for merge now.