How to show HTML game in landscape mode?

Please forgive my lack of HTML knowledge. I have this game https://candaditos.academiacanarialengua.org/ that is meant to be played in landscape mode (or in a PC browser). Not portrait, only landscape, so I want the browser to show it that way somehow.

Is there a way to change the HTML file used be Defold to allow that? The same game in itchio behaves differently on iOS and Android Canarismos by PlayMedusa, but I’m asking about self hosting, itchio is just shown to explain what I’m looking for.

HOWEVER:

on Android, itchio automatically starts in landscape mode. Pressing Defold’s ‘fullscreen button’ does not much, as it’s already in landscape mode with a 16:9 aspect ration

on iOS the fullscreen button doesn’t seem to work, and it doesn’t start automatically in landscape mode.

on PC it doesn’t really matter, as it’s shown big enough in 16:9 already.

I understand itchio does something with the iframe that contains the game. But is it possible to do something like that in the html template used by Defold? Like ‘that’ being showing the game in landscape mode, ideally fullscreen, when I self-host the game.

Thanks!

Ok, so I’m testing the “Fullscreen” button that you can add to the HTML5 template, and I confirm:

  • On Android, the fullscreen button makes the game go fullscreen but it keeps the current orientation. If you rotate the phone it rotates too (so rotation is not locked, there’s not an option for that, right?)

So this is the whole process for playing on Android:

Visit site,

Rotate phone,

Press the Fullscreen button.

Quite a journey :smiley:

  • Worse, on iOS (Safari) the fullscreen button doesn’t seem to work at all, and when rotated it looks like this (I translated “Fullscreen” to Spanish, but other than that it’s the same button)

Halp? :frowning:

1 Like