🏠 Home 

Zoom and crop YouTube videos to fill screen height

Removes letterboxing by cropping the left and right edges off of full-screen YouTube videos and zooming to fill the screen height.

< Feedback on Zoom and crop YouTube videos to fill screen height

Review: OK - script works, but has bugs

§
Posted: 21-02-2025
Edited: 21-02-2025

I wish the toggle could take affect in default view. I cannot watch in theater mode because the stupid scrolling top bar obscures ¼ of the screen and I've completely disabled full screen and "swipe to full screen" using another script because again YouTube doesn't resize properly on my mobile in browser desktop mode.

uxamendAuthor
§
Posted: 21-02-2025
Edited: 21-02-2025

The toggle is supposed to work in Default View. It works for me.

There are a number of reasons why it might not work for you.

It could be a usability bug; maybe the way the toggle works in Default View is not obvious enough.

It could be a bug that only shows up when the script is run in a specific browser or class of browsers, or with touch input -- I have only really tested this script in desktop versions of Firefox and Chromium. This script was created to scratch a personal itch so testing on other browsers hasn't been a priority.

It could be an interaction with another userscript or add-on that you are using.

It could be that YouTube has updated their UI in a way that breaks this script. I've just tested the script and it's still working for me, so, if it's a YouTube change, it hasn't hit everyone yet. It could be an experimental change that never hits everyone and eventually they will roll it back and the script will work again. Or, it could be a permanent change, in which case it will probably hit me eventually and then I will have to figure out how to fix the script. I will say that debugging this script is a fairly low priority for me. While I would like to fix any problems it has, my track record says it will probably take me an age to get around to doing it, so apologies for that.

uxamendAuthor
§
Posted: 21-02-2025

Oh, I just realised that you might be talking about the difference in the way the cropping works in Default and Theater views, as opposed to full-screen view.

In full-screen view, by default the videos are cropped to fill the height of the screen. Outside of full-screen view, they are cropped to 16:9 by default.

You can change this. If you want to change it, look for the line that says var player_aspect = 16/9; near the top of the script.

If you want the videos to be cropped to the screen width instead of 16:9, then change it to var player_aspect = 0;

Or, if, for example, you wanted the videos to be cropped to 4:3, you could change it to var player_aspect = 4/3;

It defaults to 16:9 because I prefer that behaviour in most cases, and I wrote the script to suit myself.

Note that if you edit the parameters, you may not automatically get updates to the script if I ever get around to releasing any. (Implementing parameters in a way that doesn't require editing the script to change them is on my to-do list.)

uxamendAuthor
§
Posted: 21-02-2025

Correction to my previous comment: In the fourth paragraph, when I said that setting var player_aspect = 0; would cause videos to be "cropped to the screen width" I should have said they would be cropped to the same aspect ratio as the screen.

§
Posted: 22-02-2025

Alright, I appreciate the reply. For now YouTube remains unwatchable in landscape mode but I'll muddle through. Wild guess: I think the problem is related to the viewport not conforming to my specific device display size but im no technical expert.

Post reply

Sign in to post a reply.