Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome - fullscreen subtitles are not in right position. #1

Closed
xtsss opened this issue Jan 3, 2015 · 4 comments
Closed

Chrome - fullscreen subtitles are not in right position. #1

xtsss opened this issue Jan 3, 2015 · 4 comments

Comments

@xtsss
Copy link

xtsss commented Jan 3, 2015

When going fullscreen on chrome, subtitles moves, are not visible or are in wrong position, on firefox everything works ok.
go here:
https://sunnyli.github.io/videojs-ass/example.html
on chrome and go fullscreen.

@SunnyLi
Copy link
Owner

SunnyLi commented Jan 3, 2015

Hmm.. I can't do anything about this unfortunately.
Since the problem was caused by changing the browser zoom level.

I couldn't find any method to disable/reset the browser zoom on desktop other than manually changing the CSS transform scale to make the font look like it was back at 100%, but the browser zoom detection method isn't reliable anymore.. so I don't think this can be fixed.

Anyways, if you are the only person facing this problem and you don't need large texts then Ctrl+0 😉

@xtsss
Copy link
Author

xtsss commented Jan 3, 2015

Thanks, its ok, i just didnt know previously that its caused by zoom, it can be as it is, i will just go back to normal 100% page, without zooming, thanks :) everything works great, good work.

@xtsss xtsss closed this as completed Jan 3, 2015
@Arnavion
Copy link

Arnavion commented Jan 3, 2015

@SunnyLi

Instead of trying to measure the browser zoom, why don't you try to resize to the player's width and height? Currently you resize to (screen.width, screen.height) in updateDisplayArea()

Eg: If I have a 1920x1200 monitor and the browser is zoomed to 200%, the fullscreen video element (iframe) is 960x600. However screen.width and screen.height continue to be 1920x1200 since they are measured in device pixels, not viewport pixels.

Instead of using screen.width and screen.height, it should use some method of getting the player's width and height. (It did not seem that player.width() and player.height() report it because they continued to give the pre-fullscreen dimensions. Not sure whether videojs can give that information.)

@SunnyLi
Copy link
Owner

SunnyLi commented Jan 4, 2015

@Arnavion

You're right, but like you said there's currently no way to get the updated dimensions.
Also, videojs supports different source providers each having wrappers being implemented differently, so its not likely to have a unified method to access those video dimensions.

EDIT: Getting the updated dimension is actually possible and has been fixed in 807a2ad.
However I'm not sure about the browser zoom thing and if that is still a problem.. not sure how I came to the conclusion of being a browser zoom issue.. maybe there was an image here before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants