Any way to make "fullscreen" function on website not actually go fullscreen?
Moderator: trava90
Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
-
- Moonbather
- Posts: 65
- Joined: 2014-11-04, 12:27
- Location: Kiev, Ukraine
Any way to make "fullscreen" function on website not actually go fullscreen?
The problem: when you have a big enough monitor, especially ultrawide one, you often want to have media player on website (youtube, twitch, etc) to not cover your entire screen. But, there is a huge issues with how this websites are designed - in the "normal" mode media player only take small part of browser window, and if you press "fullscreen" button it causes browser to go fullscreen and cover your entire screen.
Any way to make palemoon (setting, addons) to not resize browser window when "fullscreen" is requested by website?
I had and idea to achieve this via window manager (force windows size), but it doesnt work. To be precise, window size stays, but media player on websites is still resized to actual screen resolution.
So what i want is browser to
1. lie to website about screen resolution (report window size)
2. do not change window size when "fullscreen" is requested by website
Any way to make palemoon (setting, addons) to not resize browser window when "fullscreen" is requested by website?
I had and idea to achieve this via window manager (force windows size), but it doesnt work. To be precise, window size stays, but media player on websites is still resized to actual screen resolution.
So what i want is browser to
1. lie to website about screen resolution (report window size)
2. do not change window size when "fullscreen" is requested by website
-
- Knows the dark side
- Posts: 5174
- Joined: 2011-10-03, 10:19
- Location: Piney Woods of Southeast Texas, USA
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
Define "big enough monitor" with regards to size. What size monitor do you have? Is it 32", 42", 48", 55" etc.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
-
- Astronaut
- Posts: 588
- Joined: 2015-06-01, 12:52
- Location: US Southeast
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
This functionality can be provided by the OS in the form of breaking the display up into virtual monitors. What OS are you running?
-
- Keeps coming back
- Posts: 752
- Joined: 2020-05-31, 04:33
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
You can just run your videos through the mpv media player. For example, here's a video on using Pale Moon on FreeBSD:
Code: Select all
mpv https://yewtu.be/watch?v=ocCHNdki778
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
If it's on YouTube, you can just use Theater mode and that works pretty well.
There is a pref to disable the fullscreen API (full-screen-api.enabled), but I don't know if that will work the way you want. On some websites it falls back to letting the video just fill the browser window, on others it just doesn't let you increase the size of the video at all.
There is a pref to disable the fullscreen API (full-screen-api.enabled), but I don't know if that will work the way you want. On some websites it falls back to letting the video just fill the browser window, on others it just doesn't let you increase the size of the video at all.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Astronaut
- Posts: 556
- Joined: 2018-04-20, 20:31
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
I don't know how Brave does it, but I want PM to do the same. It breaks streaming YT videos through Discord otherwise.
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
So, I did find a way to do it in the C++ code, but I am not sure how to do it with an extension...
https://xref.palemoon.org/goanna-centra ... .cpp#10887
If I set that value to "return true" instead of "return false," and recompile, any attempt to make a video fullscreen just makes it fill the window without resizing it or making the browser controls disappear. That sounds like what you want if I'm hearing you right, but I am not sure?
I think an extension would probably have to intercept calls to "requestFullscreen" and make it do something different, but that approach would probably work too.
EDIT: Just doing that by itself is a little buggy if you enter and exit the full screen mode a few times, but it seems like all that's happening is it's calling the same code it calls when you hit F11 before applying the "fullscreen" mode to the content. If it can be made to just skip that part of the code, it should make the content fill the viewport without resizing it.
https://xref.palemoon.org/goanna-centra ... .cpp#10887
If I set that value to "return true" instead of "return false," and recompile, any attempt to make a video fullscreen just makes it fill the window without resizing it or making the browser controls disappear. That sounds like what you want if I'm hearing you right, but I am not sure?
I think an extension would probably have to intercept calls to "requestFullscreen" and make it do something different, but that approach would probably work too.
EDIT: Just doing that by itself is a little buggy if you enter and exit the full screen mode a few times, but it seems like all that's happening is it's calling the same code it calls when you hit F11 before applying the "fullscreen" mode to the content. If it can be made to just skip that part of the code, it should make the content fill the viewport without resizing it.
You do not have the required permissions to view the files attached to this post.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Keeps coming back
- Posts: 940
- Joined: 2021-01-26, 11:18
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
You can create a bool preference:
full-screen-api.ignore-widgets = true
Then the browser will work exactly as you want, as far as I understand.
full-screen-api.ignore-widgets = true
Then the browser will work exactly as you want, as far as I understand.
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
Confirmed working! Apparently the Mozilla developers left a backdoor in place to do this that isn't exposed by default, because I can imagine it would useful when debugging fullscreen mode, since you want to know if it's a DOM issue or a bad widget interaction.
I somehow missed it, but I wasn't looking in the right place.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Keeps coming back
- Posts: 752
- Joined: 2020-05-31, 04:33
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
That works. Pretty cool! The pref already exists in modern FF (set to 'False' by default), at least it is in the FF fork called Abrowser in the distro I'm using right now.
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
Confirmed, this is listed in about:config by default in modern Firefox, and has been since version 59.andyprough wrote: ↑2023-12-19, 05:23That works. Pretty cool! The pref already exists in modern FF (set to 'False' by default), at least it is in the FF fork called Abrowser in the distro I'm using right now.
https://bugzilla.mozilla.org/show_bug.cgi?id=1422535
It was originally implemented for B2G here:
https://bugzilla.mozilla.org/show_bug.cgi?id=772743
And someone at Mozilla proposed removing the pref here, but is meeting some resistance from people who say it should just be renamed:
https://bugzilla.mozilla.org/show_bug.cgi?id=1808348
So a poorly-named pref is just randomly in the codebase for debugging B2G, but it's actually something users keep requesting without knowing where to find it, and probably some developers don't know it's even in there either.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Keeps coming back
- Posts: 940
- Joined: 2021-01-26, 11:18
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
You were looking in the right place, you just didn't get to the end.
I started searching from the place you indicated.
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
Ah, good to know. Honestly, I do often get a little ahead of myself when reading code and think I read far enough when I haven't, so that does make sense.
In any case, the pref should be exposed by default in the future.
In any case, the pref should be exposed by default in the future.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Knows the dark side
- Posts: 4984
- Joined: 2015-12-09, 15:45
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
That's all that they know to do - keep killing Firefox by a thousand cuts since version 4.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
-
- Pale Moon guru
- Posts: 35651
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Keeps coming back
- Posts: 940
- Joined: 2021-01-26, 11:18
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
Off-topic:
Would you like to add "dom.always_stop_slow_scripts" as well?
viewtopic.php?f=70&t=30569&p=246517#p246290
Would you like to add "dom.always_stop_slow_scripts" as well?
viewtopic.php?f=70&t=30569&p=246517#p246290
-
- Moonbather
- Posts: 65
- Joined: 2014-11-04, 12:27
- Location: Kiev, Ukraine
-
- Lunatic
- Posts: 286
- Joined: 2018-05-26, 18:13
Re: Any way to make "fullscreen" function on website not actually go fullscreen?
The toolbar popup doesn't work with this pref enabled, but F11 still does. Maybe you won't care but I'm used to using the button.
Win10home(1709), PM33.1.0-portable as of Apr 23, '24
-
- Keeps coming back
- Posts: 940
- Joined: 2021-01-26, 11:18