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

Ultrawide full window zooms in videos instead of black bars #70

Closed
ToiletUncle opened this issue Apr 14, 2022 · 11 comments
Closed

Ultrawide full window zooms in videos instead of black bars #70

ToiletUncle opened this issue Apr 14, 2022 · 11 comments

Comments

@ToiletUncle
Copy link

Most YT videos are 16:9 so when resized to full window in my 21:9 ultrawide screen there should be black bars at the sides, keeping the aspect ratio. Something broke recently, now resized videos fill up the width of 16:9 videos to my 21:9 screen, black bars gone, causing videos to be zoomed in.

@Zren
Copy link
Owner

Zren commented Apr 14, 2022

Can't seem to reproduce on Firefox in Linux. I'll try Chrome in Linux next.

Can you reproduce the bug when logged out in Incognito/Private mode in your browser? It might be an A/B test by YouTube.

@ToiletUncle
Copy link
Author

After PC restart the problem seemed to be resolved on its own, hence I cannot reproduce the bug now. Both normal mode/incognito mode works fine as of now.

@ToiletUncle
Copy link
Author

The problem started again in chrome, even in incognito. Nothing I can be done on my end to resolve this issue.

@ohohohoo
Copy link

I'd like to chime in. I never had issue like this until today. Maybe Youtube made changes that's being deployed gradually? I'm not sure.

This is what it look like https://i.imgur.com/Yjlym5k.jpeg but basically any videos will be played zoomed like that without the black bar on the side like it used to be before. Restarting as mentioned above has no effect and the only way to see the video normally is by disabling the userscript.

@hoover900
Copy link

Having the same issue with Firefox on mac OS

@riccardosimo
Copy link

riccardosimo commented Apr 19, 2022

Same hereeee :(
It'd be wonderful if you can remove the black bars in the videos (but fix the zoom problem) 😃

@marcelbrode
Copy link

Having the Problem on Chrome on Win 10 and Ubuntu 20.04 as well

@Zren
Copy link
Owner

Zren commented Apr 19, 2022

Yeah I can test it now too. Looks like the new YouTube CSS has:

.ytp-fit-cover-video .html5-main-video {
  object-fit: cover;
}

Which crops the video. We want

.ytp-fit-cover-video .html5-main-video {
  object-fit: contain;
}

Zren added a commit that referenced this issue Apr 19, 2022
Also fix splash thumbnail cropping when not autoplaying.
@Zren
Copy link
Owner

Zren commented Apr 19, 2022

v130 should fix the cropping (and the non-autoplay splash thumbnail).

@riccardosimo
Copy link

v130 should fix the cropping (and the non-autoplay splash thumbnail).

Yeeee it works again :D btw I was wondering if it's possible to remove the black bars in the videos 🤔

@Zren
Copy link
Owner

Zren commented Apr 20, 2022

possible to remove the black bars in [around] the videos

While it would be possible to query the video height. I'd basically need to test 3:2, 16:9, 21:9 videos (and 9:16, 9:21 for vertical phone videos) every time YouTube breaks. Not really interested in a feature that shows like 200px of the YT top nav and maybe the video title.

Just use YT's default theater mode if you don't want to use the full window height.

Or set playerHeight = '100vh'; to playerHeight = '90vh'; or something.

@Zren Zren closed this as completed Jun 26, 2022
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

6 participants