videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.57k stars 7.4k forks source link

Make videojs 5 responsive without using fluid #3008

Closed giggioman00 closed 8 years ago

giggioman00 commented 8 years ago

There is a way for make the videojs 5 player responsive without using vjs-fluid?

mmcc commented 8 years ago

What's the reason for not wanting to use .vjs-fluid?

Closing since this is a question that doesn't need action, but we can keep talking in the comments.

giggioman00 commented 8 years ago

I need to use the plugin "videojs-ass". But this plugin it's not full compatible with .vjs-fluid...

So I want to try to make my player responsive without .vjs-fluid, maybe without .vjs-fluid the plugin will works...

gkatsev commented 8 years ago

We probably should kindly ask videojs-ass to update itself to support fluidity since there isn't any other way to make the player response and have videojs-ass still function correctly, it sounds.

giggioman00 commented 8 years ago

videojs-ass already support vjs-fluid, the problem is that it's not fully compatible. I mean, with .vjs-fluid the subtitled are placed in thewrong position and in some resolution the subtitles doesn't even appear. If they could fix this compatibility problem would be awesome, but I need to make everything working by 1st February... I don't know how many chances for get everything working within 14 days. The owner of the plugin takes around 7 days for just answer a question.

mmcc commented 8 years ago

@giggioman00 If you're on a deadline, I would suggest not relying on OSS contributions to fix your problem. Not trying to be rude, just remember that your deadlines are not theirs, and it's unfair to make them so.

Do you have an example online we could take a look at? It looks like the plugin relies on the player height to make rendering calculations, which isn't going to work when the player is fluid-width. This could probably be done using CSS positioning instead, but if you have a hard timeline, you should fork and make the changes you need. You could also be awesome and consider contributing back!

Good luck! Let us know how things go.

giggioman00 commented 8 years ago

That is the master branch, which is not compatile with videojs 5. The branch compatible with videojs5 is the 0.5 and is here: https://github.com/SunnyLi/videojs-ass/blob/v0.5/src/videojs.ass.js

If you could tell me where is the problem I wil try to do something

mmcc commented 8 years ago

In the 0.5 branch things are a little different, but it's still not going to work given a fluid video. Here's an example that shows what I mean.

gkatsev commented 8 years ago

I think the main issue with how videojs-ass is checking the size of the player is that it's relying on player.width to return the current size of the player. It does not. videojs-ass should be updated to use the computed style of the player to calculate dimensions.