Ninjadoodle Posted July 6, 2014 Share Posted July 6, 2014 Hi guys Just wondering if there is a way to make a game play in fullscreen on a device. It seems to work by default on my iPhone 4s but when I try on a Galaxy s3 or iPad 2, the browsers address bar and menus are still there? Any ideas? Quote Link to comment Share on other sites More sharing options...
IvanK Posted July 7, 2014 Share Posted July 7, 2014 Hi,I have a web http://www.funintablet.com/ . When you choose any of the games, there is a fullscreen button at the top right corner. You can see my code (pure JS):function makeFullscreen(id){ var el = document.getElementById(id); if (el.requestFullScreen ) el.requestFullScreen(); else if (el.webkitRequestFullScreen) el.webkitRequestFullScreen(); else if (el.mozRequestFullScreen ) el.mozRequestFullScreen();}I have tested my site in several desktop and Android browsers, it works everywhere. nacs and Ninjadoodle 2 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 7, 2014 Author Share Posted July 7, 2014 Awesome! Thanks for your help, I really appreciate it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.