mderrick / react-html5video

A customizeable HTML5 Video React component with i18n and a11y.
http://mderrick.github.io/react-html5video/
MIT License
459 stars 123 forks source link

HLS support ? #59

Open kanasite opened 8 years ago

kanasite commented 8 years ago

Will this be supporting video live streaming soon ?

https://github.com/dailymotion/hls.js/

mderrick commented 7 years ago

Sorry for the long delay. I'm hoping on tackling many new features in v2. This may be one of them.

mgreer commented 7 years ago

I'm going to suggest this as an HOC solution, instead of baking it into the player itself. I think the player should just take inputs and play them, focus on being a great HTML5 player. That's how I implemented this myself, as a wrapper over this player.

mderrick commented 7 years ago

@mgreer I would love to see this wrapper.

mgreer commented 7 years ago

It is a bit specific to my needs right now, but I should pull it apart into something reusable.

HLS.js works by attaching to a Video element, which your player provides. I have it wait until your player is ready, and setup HLS.js. Then I call attachSource(m3u8 file).

In fact, I did this so I could hand your player to HLS supporting browsers (mobile phones) directly, and wrap it in HLS.js for all others (that support MSE).

Let me think of how to best tease out this behavior and share it as a proper HOC component. Best in another repo, most likely, so people don't need to load HLS.js if they don't care to.