benjipott / videojs-hlsjs

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

Is VideoJS 5.0 supported? #1

Open halibegic opened 8 years ago

halibegic commented 8 years ago

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 
dcrockwell commented 8 years ago

+1 had same issue

ziodave commented 8 years ago

I managed to have HLS working with videojs-contrib-hls (you have to use the development branch).

aronallen commented 8 years ago

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?

ziodave commented 8 years ago

I have the following set in Firefox 41.0:

In Firefox 42.0 I have the following set:

I am using

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?

aronallen commented 8 years ago

@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.

aronallen commented 8 years ago

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.

tiagopadua commented 8 years ago

@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.

codex-corp commented 8 years ago

@aronallen

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

aronallen commented 8 years ago

@codex-corp @tiagopadua please fork it and submit your changes as pull requests back to me.

codex-corp commented 8 years ago

@aronallen done .