Jump to content

Fullscreen is not working in Chrome v56 (Android).


Nellykey
 Share

Recommended Posts

Hi,

I have a full-screen mode in my game and it works fine before Chrome update. This code still works fine on Firefox on the same device.

I found also that http://phaser.io/examples/v2/display/fullscreen is not working in Chrome v56 too.

Have you met this issue and how you fix it?

I also will be glad if Rich give some answer/comments about this issue.

If it will help you, I also found, that fullscreen works JUST if you click a border between the game and background (not the game and not a background, just a place where they connects together).

Best wishes, NellyKey

6AvWIX7YGcE.jpg

 

Link to comment
Share on other sites

  • Nellykey changed the title to Fullscreen is not working in Chrome v56 (Android).

I'm also having this problem, but with my own game framework using PIXI, but as I understand, Phaser and PIXI are related. Something is making chrome think the event is NOT triggered by user action. I've inspected the browser console and it logs a error warning that the API call to use fullscreen must be called from a user event. The stack trace goes all the way back to the event though.

Chrome 56.0.2924.87 on Android 7.1.1 Nexus 6P Build N4F26T

 

Link to comment
Share on other sites

On 16.03.2017 at 5:23 PM, ade2 said:

I'm also having this problem, but with my own game framework using PIXI, but as I understand, Phaser and PIXI are related. Something is making chrome think the event is NOT triggered by user action. I've inspected the browser console and it logs a error warning that the API call to use fullscreen must be called from a user event. The stack trace goes all the way back to the event though.

Chrome 56.0.2924.87 on Android 7.1.1 Nexus 6P Build N4F26T

 

In my app fullscreen will starts when user interacts whole screen (there is no "fullscreen button"). So I've solve the problem this way:

1. Put renderer to div:

_fullscreenTarget = document.createElement('div');
document.body.appendChild(_fullscreenTarget);
_fullscreenTarget.appendChild(_renderer.view);

2. Add event listener click/tap to div
3. Disable pixi's autoPreventDefault to catch events on div

this._renderer.plugins.interaction.autoPreventDefault = false;

4. When eventListener called just run my old fullscreen mechanism 

document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);

5. Stupid browser thinks that it's legal unlike when canvas interacted <_<

Link to comment
Share on other sites

  • 4 weeks later...

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...