HTML5 mobile -- Fullscreen (& Sound)

When you export to HTML5 and play it on mobile, i got the prob that i can´t start the game in fullscreen, while pressing the “fullscreen” button. Does anybody have the same issue ?

Usualy i use this JS-code to get into fullscreen:
goFullscreen = function() {
var el = document.documentElement,
rfs = el.requestFullscreen
|| el.webkitRequestFullScreen
|| el.mozRequestFullScreen
|| el.msRequestFullscreen
;
rfs.call(el);
};
BUTTON.onclick = function () {
goFullscreen();
};

Sound works mostly. Did you use “AudioContext”? The problem on Mobile HTML5 is, that the browsers need user input to allow playing a track. But with AudioContext you don´t need user input. Which method DEFOLD use ?

Cheers :beers:

Which mobile device are you testing on? Fullscreen usually works on Android just fine.

I tested it in different Android-Mobiles (4.2 to 8.1). All with a new chrome-browser.

Somehow it works on some, and on others it doesn´t work. No idea why it is that random. My guess is that the standard-fullscreen-button isn´t active sometimes !?

Some Questions about Sound (HTML5):
Is it a usual behaviour, that sound got a small delay, when you play a game on a mobile-browser ? I compared the same game on a Dekstop-Browser and done also a comparison with a native version. They both don´t have any delays. Only the mobile-browser version got that small delay. Anybody expirienced the same ?

1 Like