benjipott / videojs-hlsjs

Hls.js plugin for videojs
Other
79 stars 31 forks source link

Flash fallback with hls error #9

Open nbashev opened 8 years ago

nbashev commented 8 years ago

I'm unable to play live hls video with this code on flash enabled browser. Html5 works as expected. For flash only enabled browsers (iceweasel) I get: VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this video. After this error I get another: TypeError: currentTech is undefined

I already did initialized the player with the following techOrder: techOrder : ['flash', 'hlsjs', 'html5'] and setup hlsjs for live hlsjs : {live : true}

Is there something that I'm missing?

whatvn commented 8 years ago

This plugin is html5 only, it only support browser with MSE enabled, no flash fallback.

campones commented 8 years ago

I tried on IE11 and it didn't work, worked fine on chrome firefox43 opera, and on chrome android 4.0.4

campones commented 8 years ago

I think what you have to do in that case is setup that mangui custom videojs.swf, this flashplayer can handle hls. Either modify the video.js swf path or override it inline videojs.options.flash.swf = "/path/to/local/video-js.swf"

Then in the tech order I used the following order that was the only one that would also work with android and IE techOrder : ['hlsjs', 'flash', 'html5']

but to have this working, I had to duplicate the souce in the video tag and change the type so I have

<source type="application/x-mpegUrl' src=.. > for hlsjs and html5
<source type="video/mp4" src=.. >  for the flash player

but I agree that this isn't a very gracious solution