Jump to content

Hide address bar in browser


rvizcaino
 Share

Recommended Posts

Hi, I am trying to hide my address bar in browser, without success, maybe can give me a little help with this? This is my code in the create function in Boot.js. Thanks!

this.input.maxPointers = 1;this.input.addPointer();this.stage.disableVisibilityChange = false;this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;this.scale.pageAlignHorizontally = true;this.scale.pageAlignVertically = true;this.stage.forcePortrait = true;this.scale.setScreenSize(true);this.stage.backgroundColor = '#00c6ff';this.state.start('Preloader');
Link to comment
Share on other sites

Hey @rvizcaino,

 

Try adding these meta tags to your index.html file:

<meta name="HandheldFriendly" content="true" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="black" /><meta name="apple-mobile-web-app-title" content="Phaser App"><meta name="viewport" content="initial-scale=1 maximum-scale=1 user-scalable=0 minimal-ui" />
Link to comment
Share on other sites

@FyreTale

unfortunately they removed this option :/ (really liked it, but I see the disadvantages on it).
They even changed the scroll event of websites on iOS7 -> The events got only fired after scrolling,
till iOS 8.1 the event is fired directly in safari, but not chrome. 
since ver7, there were so many changes which were mainly disadvantages :/ but hey got some fixed in 8.1
(nothing to do with phaser)

@back to topic
I'm not sure if you can run the phaser-game in some kind of fullscreen like videos on the web can do.
So this is the only solution approach I can think of when you do not want to use a wrapper for native deployment.



 

Link to comment
Share on other sites

  • 4 weeks later...

Unfortunately it's not really possible to do it well. I just recommend using nice viewport setting and let the addressbars be there and post a report to Apple requesting fullscreen mode support. iOS8 iPhone does something specific if you make you game landscape, but then there's issue with the touch points which activate the address and bottom bars back visible.

 

Our solution is just allow portrait mode and have game in little bit smaller window due browser UI. iPad has larger screen, so the browser UI is static in size and doesn't interfere that much.

 

That said, wrap up your game as native app which allows fullscreen. In our case games are supposed to work inside webpage so native application approach is not possible.

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