Discussions » Creation Requests

Youtube video automatic-fullscreen script (not just resizing the video, actual fullscreen that you get when you press F)

§
Posted: 06.08.2024.

I am looking for someone to create a script that automatically fullscreens youtube videos. I am not talking about resizing the video size like how theater mode resizes the video window because the tab menu bar of the browser will still be present at the top and the windows taskbar will still be present at the bottom. I am looking for a script that actually makes the video automatically open in fullscreen mode when I open a video link on youtube.com. What I mean by fullscreen mode I mean by the mode that activates when you press "F" on the keyboard when watching a youtube video. I have been linked scripts before that just resize the video to be slightly larger than theater mode that is not the fullscreen mode that you get when you press "F" on the keyboard.

§
Posted: 06.08.2024.
Edited: 06.08.2024.

Some devs say that it is impossible so I haven't even tried it, although maybe I would be able to do that.
I did something that achieves pretty much the same thing, and people gave me good feedback in the past, seems like nothing else works or helps more than my script (although I haven't looked for a better working solution)
https://greasyfork.org/en/scripts/435669-redirect-yt-video-to-embedded-video

§
Posted: 03.12.2024.

its extremely easy, no idea why someone would say its not possible, dm me and i'll write it

§
Posted: 03.12.2024.

its extremely easy, no idea why someone would say its not possible, dm me and i'll write it

Maybe this is the issue
https://greasyfork.org/en/scripts/435669-redirect-yt-video-to-embedded-video/discussions/130326#comment-293195

§
Posted: 03.12.2024.

alright, well have a good day

§
Posted: 03.12.2024.

The dumbest way works document.querySelector("#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-right-controls > button.ytp-fullscreen-button.ytp-button").click();

But I think that JS commands that were made to do it wouldn't work maybe.

§
Posted: 03.12.2024.

its not that difficult, you just need to include childlist because of the fact its in the video, heres a piece i threw together as a demo, but can be improved upon to match your case


document.addEventListener('yt-navigate-finish', function() {
var clickInterval = setInterval(function() {
var fullscreenButton = document.querySelector('[title="Full screen (f)"]');

// If the button is found, click it and clear the interval
if (fullscreenButton) {
fullscreenButton.click();
clearInterval(clickInterval); // Stop trying after successful click
}
}, 100); // Click every 0.1 seconds
});

Post reply

Sign in to post a reply.