-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect Fullscreenmode #1
Comments
Well, I've tried it myself with no luck. I'm only wrapping the screenfull library, and they are only putting a thin layer on top of the HTML5 fullscreen API. I've searched on the screenfull issue list, and it was listed as a bug that couldn't be fixed It seemed strange that it couldn't be fixed, so I searched in the mozilla specs and other sites and found this: What it basically says is that they don't fire the event for security reasons :S... Not much we can do about it. |
We had a need to determine if the page was fullscreen or not by using both. At first, I tried The solution that we came up with was to watch the window height:
Everytime the window resizes, we check to see if the height matches the screen height. If it does, we assume it's fullscreen. We don't check width, as I have the console docked to the side and that screws with the window size (console docked to the bottom will cause this to not work). It's definitely hacky and not a proper solution, but for every day users that aren't working in the console, this seems to work well. |
Nice hack ;)... you can even make a directive or service out of that. |
What about just preventing the F11 effect, is it possible? This will force user to enable fullscreen some other way |
onresize = (event) => { |
Hi,
what if I press F11 on my keyboard or activate the fullscreen mode over my browser manually, is there a function/event to detect this? Can you implement a functionality to this?
See: http://stackoverflow.com/questions/16755129/detect-fullscreen-mode
patlux
The text was updated successfully, but these errors were encountered: