React-player: Support of dash,hls

Created on 26 Apr 2017  路  8Comments  路  Source: cookpete/react-player

Does it supports dash and hls ? anytime soon ?

Most helpful comment

Published in 0.18.0

All 8 comments

The player falls back to <video> if the url passed in cannot be played by any of the custom players. Any browser that supports HLS or DASH will work. Try opening this fiddle in Safari to see ReactPlayer working with one of Apple's example HLS streams.

Hey @CookPete, so it seems that your link above works only in Safari since that comes with native support for HLS. What do you think about adding HLS.js or Dash.js, so that they play in all the browsers?

FWIW as reference implementations, Clappr and Shaka-player seems to be supporting both HLS and DASH (more iffy).

Here is one player integrating it in React as a reference: https://github.com/foxford/react-hls/blob/master/src/HLSPlayer.jsx#L98

@CookPete To provide more context for this request, I am thinking that if we incorporate these two libraries, then that might mean that it should (theoretically) work on all browsers, which would mean a huge saving in encoding cost, since you are only encoding to one format (and not needing to deal with multiple resolutions either).

Thoughts?

@oyeanuj I wasn't aware of these libraries until now but they looks like a good solution. I have integration with hls.js working for .m3u8 URLs so will publish that soon after I look at supporting dash too. In the meantime, are there any other HLS file extensions to detect? I've also added a forceHLS config option to fileConfig for more ambiguous URLs.

@CookPete Awesome, thats good to hear! For hls, it seems like .m3u8 would be sufficient according to Apple.

Will have to study MPEG-DASH more to respond for that.

The dash.js readme examples use manifest.mpd so I'll use mpd for now, and add a forceDASH boolean to fileConfig.

Published in 0.18.0

wow, that was quick!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MDrooker picture MDrooker  路  6Comments

pwbrown picture pwbrown  路  8Comments

MarcLopezAvila picture MarcLopezAvila  路  5Comments

wmertens picture wmertens  路  7Comments

rockmandash picture rockmandash  路  5Comments