Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

html5 full screen
Started by Aarbron Nov 07 2018 03:08 AM

- - - - -
3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Aarbron

[GLOBAL: userInfoPane.html]
Aarbron
  • Observer

  • 6 posts
  • Corona SDK

Hi!

 

How can I make my html5 game go full screen on mobiles / tablets?

 

Hide web browser and have only the game on screen.

 

I have searched the forum / site and couldn't find something about it!

 

 

 



[TOPIC: post.html]
#2

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 188 posts
  • Corona Staff

Try to set defaultMode = "fullscreen" in the build.settings file, something similar to
 
settings =
{
  orientation =
  {
    default = "portrait",
    supported = { "portrait" }
  },
  window =
  {
    defaultMode = "fullscreen",
  }
}


[TOPIC: post.html]
#3

Aarbron

[GLOBAL: userInfoPane.html]
Aarbron
  • Observer

  • 6 posts
  • Corona SDK

Hello!

 

I would like to hide the web browser and have only the game on screen.

 

Make the address bar and the other graphical elements of the web browser hidden.



[TOPIC: post.html]
#4

richard11

[GLOBAL: userInfoPane.html]
richard11
  • Contributor

  • 185 posts
  • Corona SDK

You can use JavaScript to launch your game from a button on another web page, and pass parameters with that call to tell the browser to hide the general window elements. But this is a really, really, really old-skool mechanic that as far as I'm aware isn't supported by modern browsers. Additionally it'll cause just about all popup blockers to trigger.

https://www.w3schools.com/jsref/met_win_open.asp


[topic_controls]
[/topic_controls]