Jump to content

Problems with fullscreen on different ports in Phaser


weratius
 Share

Recommended Posts

Hi, I am creating a game 

 

I have such a code in the method "create()":

game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;game.scale.refresh();

And I have an eventListener in chat window:

if(message != '/fullscreen') {                var event = {                    type: "chatMessage",                    message: $( this ).val(),                    channel: activeChat,                    id: 1,                    cookie: getCookie(cookiename)                };                var str = JSON.stringify(event);                console.log(str);                ws.send(str);            } else {                if (game.scale.isFullScreen) {                    game.scale.stopFullScreen();                } else {                    game.scale.startFullScreen(false);                    game.scale.refresh();                }            }

Everything works fine on localhost:8888 port, but when I change the port on localhost:8000/game there is such an error:

 

@ Phaser.ScaleManager: requestFullscreen failed or device does not support the Fullscreen API @

Link to comment
Share on other sites

I've been noticing a few issues with fullscreen and depending on the device (android chrome works great but iphone chrome doesn't do fullscreen). Seems to also give a warning stating that it needs https:// wonder if anyone else has insight.

Link to comment
Share on other sites

I've been noticing a few issues with fullscreen and depending on the device (android chrome works great but iphone chrome doesn't do fullscreen). Seems to also give a warning stating that it needs https:// wonder if anyone else has insight.

but it's just localhost, I wonder why it doesn't work

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...