Zren / ResizeYoutubePlayerToWindowSize

Userscript: Moves the YouTube video to the top of the website and fill the window with the video player.
160 stars 13 forks source link

Fullscreen breaks the page making it white #43

Closed TagoDR closed 4 years ago

TagoDR commented 5 years ago

Hello Yesterday I noticed that when I try to watch YouTube videos full screen it all becomes white and the controls are not accessible, using the ESC key I was able to exit it but the page itself has become white. The audio was going on the background all the while. On the console log I notice its reaches max attempt “ytwp.attemptToUpdatePlayerTick 150“ YouTube might have broken something. I look around in my pc for possible conflicts like extensions, scripts, browser, graphics card driver, but I could not find anything. If I disable your script fullscreen works fine. I peeked at your code but I could not find anything conclusive, I'm not used to youtube code so its very confusing to me, I wish you luck finding the cause.

Zren commented 5 years ago

Which browser?

I just tried loading a video in Firefox (after navigating from the homepage), I got a black screen (I'm in dark mode) when the page loaded. This might be unrelated as you mentioned "full screen".

2018-11-15___17-09-33

It looks like it might be trying to switch to theater mode too soon.

Does this bug happen even with a page refresh (F5)? Youtube seems to work fine if I open Youtube in a 2nd tab.

Holy shit, Youtube implemented my script's concept into their fullscreen mode!

2018-11-15___17-16-14

2018-11-15___17-17-58

Zren commented 5 years ago

So it changed --ytd-masthead-height:56px; to 0px using javascript.

So it added: ytp-fullscreen ytp-big-mode

Hmmm. Looks like it might not be a simple toggle to enter this mode with a css class or tag attribute. Ah well. I'll look again after supper.

Edit:

After looking at the tab that failed to load correctly above, it seems that it didn't even load the ytd-watch element. I removed my css classes from the body element, and unhid the ytd-browse element by deleting the hidden="" attribute. It looks weird, with it everything shifted to the left.

2018-11-15___20-40-07 I can't reproduce the bug, so I'l consider it a one off freakyness.

TagoDR commented 5 years ago

I happens in Waterfox and Firefox, for me it only triggers/crash to white if I try to fullscreen it, else it works fine. With Dark theme on it becomes black.

krystian3w commented 5 years ago

I have same bug. I use Firefox 63.0.1 (both x86 / x64) on Windows 7 x64 / 10 x86 Pro and tested with latest tampermonkey, greasemonkey, violentmonkey.

PREF:f1=50000000 VISITOR_INFO1_LIVE:7e97ydBipzg

Zren commented 5 years ago

I just experience this bug today. A fix will be uploaded soon, just gotta test a little more.

Zren commented 5 years ago

v122 should fix this bug.

krystian3w commented 5 years ago

OK, thank you.