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

@InsaneHero: broken link :/

@FyreTale

meta tags to hide the bar are not working any more since iOS 7.
you can not hide the status bar in browsers on iOS any more.

expect with video fullscreen and such stuff.


 

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

 Share

  • Recently Browsing   0 members

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