Is VideoJS 5.0 supported?
Opened this issue · 10 comments
Hi,
First of all it's great plugin and I want to use it but I'm getting an error when using the latest VideoJS version (5.0).
Uncaught TypeError: Cannot read property 'extend' of undefined videojs-hlsjs.js:10
+1 had same issue
I managed to have HLS working with videojs-contrib-hls (you have to use the development branch).
the problem with videojs-contrib-hls is that it does not work in firefox with MSE enabled. Is there a timeframe for when this plugin will be upgraded to videojs5?
I have the following set in Firefox 41.0:
media.mediasource.enabled
= truemedia.mediasource.format-reader
= falsemedia.mediasource.format-reader.mp4
= truemedia.mediasource.mp4.enabled
= truemedia.mediasource.webm.enabled
= falsemedia.mediasource.whitelist
= true
In Firefox 42.0 I have the following set:
media.mediasource.enabled
= truemedia.mediasource.format-reader
= truemedia.mediasource.format-reader.webm
= falsemedia.mediasource.mp4.enabled
= truemedia.mediasource.webm.enabled
= false
I am using
- http://vjs.zencdn.net/5.0/video.min.js
- videojs-media-sources.min.js
- videojs.hls.min.js
I am feeding an m3u8 playlist to VideojS.
And it works (I see it's switching to the Flash component loading TS chunks from the server).
What is your configuration?
@ziodave I can get it working with flash as well with videojs-contrib-hls but now that it is possible to use media source extensions in firefox it could be great to use this library which wraps hls.js. The bare bone hls.js can play videos in firefox without issues.
I have forked videojs 5.2.0, and extended it with a hls.js tech here /aronallen/video.js
Apparently you need to build your tech extensions with the project, because videojs no longer exposes the necessary objects.
feel free to contribute or expand.
@aronallen I tried your fork, works well with video.js 5.2.4!
The only thing I spend a little time trying to understand is that you MUST always pass the { techOrder: ['html5', 'hlsjs'] } as a parameter when calling videojs.
My suggestion is to avoid this by adding the following code, right after registering the tech:
videojs.options.techOrder.push('Hlsjs'); // Add as last tech order by default, so browsers such as Safari can play it natively
This way the videojs tries this plugin by default, and the user may choose to pass the parameter only if he wants to override the order.
i have tried your fork with hls v0.3.5 ,
attachVideo
is deprecated use attachMedia
https://github.com/aronallen/videojs-hlsjs/blob/f18f1eb40d2e1e84a66cc6757524ee3fc75634ce/lib/videojs-hlsjs.js#L23
@codex-corp @tiagopadua please fork it and submit your changes as pull requests back to me.
@aronallen done .