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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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