Open Rairof opened 1 month ago
On linux (wayland), I managed to reproduce this bug reliably with these steps:
I ran these lines from the video-toggle plugin in my browser and managed to reproduce the issue in the official web version too. https://github.com/th-ch/youtube-music/blob/4c2cb8dac9b0438def1f6e0efa12ec43ac94f46f/src/plugins/video-toggle/index.ts#L125-L133
I'm not sure if this behaviour is present when using an actual premium subscription (I don't have one, so I can't test it).
OBS.: as a quick workaround, triggering the window resize event seems to fix it (using the native toggle)
document
.querySelector('button.video-button.ytmusic-av-toggle')
.addEventListener('click', () => window.dispatchEvent(new Event('resize')))
I'm not sure if this behaviour is present when using an actual premium subscription (I don't have one, so I can't test it).
2024-10-14 UPDATE: reproducible (with premium subscription)
fixed at 5ca6653
Thanks to @h-banii!
I found a way to trigger this bug without the song/video toggle. It happens in the official web version too.
Video scale too small:
1) start with the left drawer open | 2) close the drawer |
---|---|
Video scale too big:
1) start with the left drawer closed | 2) open the drawer |
---|---|
The container's dimensions get updated correctly (outlined in red), but the video doesn't.
I tried with official ytm in site but it didn't triggered for me so I reported. I guess it was a combination of both the mod and ytm bug then?
Here's a css workaround for this issue
.html5-video-container, .html5-main-video {
width: 100% !important;
height: 100% !important;
}
.html5-main-video {
top: unset !important;
left: unset !important;
object-fit: contain !important;
}
Preflight Checklist
YouTube Music (Application) Version
3.5.3
Checklists
What operating system are you using?
Windows
Operating System Version
Win 11 Pro
What CPU architecture are you using?
x64
Last Known Working YouTube Music (Application) version
N/A
Reproduction steps
Expected Behavior
Video plays at correct ratio covering the whole space
Actual Behavior
Video plays at top left in a small ratio
Enabled plugins
Additional Information
It's inconsistent and sometimes works and sometimes doesn't work. Not sure why, maybe its something to do with video playback fetching or type of music video?