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

Expose hls #14

Closed Nodalailama closed 1 year ago

Nodalailama commented 3 years ago

Hi,

In my project I have a list of videos. Right now, if 10 videos appear then I have 10 start load and it consume a lot of bandwidth even if the user don't watch them. It's one of the main problem for me to use only hls video element and not other js player as usual.

So, I have made a test and if I attach hls to "this", like this.hls = new Hls ... then I can access outside hls.

May I made a mistake ? How can I control ouside the behavior of hls attach to a video ?

Thanks.

luwes commented 1 year ago

there is now an .api prop available to access the hls.js instance https://github.com/muxinc/hls-video-element/releases/tag/v0.0.5