[SOLVED] Fullscreen removes all UI

Hi Guys,

Well i am using

 button.addEventListener('click', function () {
            app.enableFullscreen(app.canvas, function () {
                
                console.log('Now fullscreen');
            }, function () {
                console.log('Something went wrong!');
            });
        }, false);

to perform a fullscreen to the canvas. When i do this my UI just dissapears. Do i have to make an extra call to resize the UI to the new canvas width and height. any light in this direction will be really helpful.

Can’t you just do:

app.enableFullscreen(document.body);

Thanks Will, That resolved it very well.

That doesn’t work for me. It gives me this error

This is the code I’m using
image

Does it print the message “this is a phone”?

Yes it does.

Hi @Visama,

Check this post:

[SOLVED] Fullscreen API is deprecated?

@Visama the fullscreen operation needs to be initiated by the user (eg. press of a button), Im guessing you’re trying to set it fullscreen automatically on load?

Yes, It has to load automatically without the user. because on phones the screen is very tiny.

Can’t be done sadly. Try putting a huge splash with an ENTER button and have that button trigger the fullscreen

1 Like

Oh ok, thanks.
Anyway I ended up doing with other means so now is working fine.