Open ConteZero opened 4 years ago
In HTML5, enabling fullscreen requires user input to be performed at the same time it's requested. This is a security limitation applied by all web browsers.
Yes, but the way it is handled by godot make the full screen startup option useless for HTML5 export.
In my project as a workaround I directly request full screen mode from javascript before starting the engine, it works but then I cannot use OS.window_fullscreen (it does not detect the correct fullsceen status) so I'm forced enable/disable fullscreen with direct js calling JavaScript.eval(...)
I think the only thing we can do here is to print a warning message if fullscreen
is enabled in the Project Settings while running on HTML5.
Maybe we can point users towards implementing "click to enter fullscreen" functionality as well.
Godot version: Godot 3.2.3
OS/device including version: HTML5 (Chrome/Firefox on Linux)
Issue description: The exported HTML5 project with setting
window/size/fullscreen=true
starts in full screen if you test it with a fast connection (as example in a local development server), but if you test it with a relatively slow connection (I've tried with a 10 Mbit ADSL) you get this error on browser console
Uncaught (in promise) TypeError: Fullscreen request denied
Steps to reproduce: 1) Create a new godot project 2) Enable full screen start-up in project settings 3) Export HTML5 project 4) change default html code adding a button to manually start the engine 5) limit network speed form browser dev tools (set DSL or slower)
Minimal reproduction project: godot-test.zip