Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a lightweight way to stream HLS Video in react?

I am currently running a React Typescript application that streams HLS video with the .m3u8 file type. Initially we used the videojs library to handle this, but changed to React-Hls-Player to reduce the bundle size of our application. RHP is definitely smaller and does the job, but it is still very large due to using hls.js.

This issue points to the min- and light-versions of hls.js, but I am unsure how I can implement these versions while using the RHP package. I am open to changing from RHP as well, if anyone has a good alternative.

like image 921
UndisclosedCurtain Avatar asked Dec 06 '25 07:12

UndisclosedCurtain


1 Answers

Have you seen the media-chrome project? It's built with web components using many native APIs and is reporting in at 20.8kb minified + gzipped.

Full disclosure, I'm a community engineer at Mux, the company behind this project, but the repository is entirely OSS.

like image 103
Dave Kiss Avatar answered Dec 08 '25 19:12

Dave Kiss