Select a youtube resolution and resize the player.
So the behavior regarding the black bars did not change (in this script) from before. What DID change was that the video now defaults to 4k instead of 1080p. Because of this, it tries to make the height of the video match a size of 4k to perfectly match the video (unless you use a custom size), and I'm guessing the resolution difference is why you see the black bars now instead of before.
However, I do think your suggestion is a good one and it would be a useful feature to let someone choose if they prefer the black bars or not. Therefore I have now added this as a new feature in an update today. There is a new setting called "removeBlackBars" (defaulting to false for no change in behavior). If you set it to true, it will cap the height to match the aspect ratio and so you will not see the black borders anymore. Please give it a try and let me know if it does what you are looking for. And thanks for the feature suggestion.
That's exactly what I want, thank you!
Also just to clarify, though it really doesn't matter anymore: I always set the `targetRes` to highest resolution ("highres") before, so it's not caused by this. I can see from the history that you indeed didn't do anything special about that, but the behavior did change, probably due to YouTube end's change.
The new theater resize works differently than before after the latest fix.
The previous behavior (and the YouTube built-in theater mode still works this way) would try to fit the width and height, BUT once the video's width is already 100% of the window width, it will no longer expand the player canvas vertically further.
This is very obvious When you make the window in a portrait size (height > width), and go into theater mode with a typical 16:9 video.
After your newest fix, when YouTubeHD's `changePlayerSize=true`, it will also expand the player canvas to the 100% height of the window no matter what, which means it shows large black areas on top and bottom (i.e. similar to how full-screen mode works).
1. YouTube default theater mode: https://i.imgur.com/XpuKrQJ.png [or attachment 2]
2. YouTube HD's `chnagePlayerSize=true`: https://i.imgur.com/3uR6YaN.png [or attachment 1]
I'm aware I can set a manual height, but this will mess up the size when the window is in landscape size. I still want it to be automatic and always try to fit within the window, but do not expand the player size *vertically* beyond the video size, which is the previous behavior.
I wish I explained the problem clearly.