Fullscreen in HTML5

#1

Is there a way to start HTML5 games in fullscreen by default when they’re loaded without needing to press the fullscreen buttom?

0 Likes

#2

No, it’s impossible because of security reason.

4 Likes

#3

You can however make the canvas fit the entire browser window.

0 Likes

#4

How would I go about doing this?

0 Likes

#5

Here is a demo from a while ago doing this, you can see the CSS there https://www.pixcade.com/cosmos/web/

It’s a very old Defold engine version now and inefficient function use so will be slow on mobile but that’s unrelated to fit window stuff. I think I added some stuff to fix mobile fit window stretching but can’t remember at the moment.

2 Likes

#6

In Defold 1.2.160 it’s easy to do with this option:

6 Likes