Riddik Posted September 25, 2015 Share Posted September 25, 2015 Hi! After the ad triggers and you close the ad, a game don't get the focus back. The issue is present only iOS9 - devices. In callback func which calls after the ad closing I set up game.paused = false; And music continues, update logic continues, but not the input - it makes any tap to impossible, all buttons don't work. I need to return the input focus back to the game. Is it possible to make something with this? I use Phaser 2.4.3 version, and disableVisibilityChange = false; Before showing the ad, I set pause, and unpause after closing. Link to comment Share on other sites More sharing options...
Tom Atom Posted September 25, 2015 Share Posted September 25, 2015 Hi, maybe not your problem, but I had problem with losing focus on iOS if game was in iframe - I wrote about it some time ago on this forum: http://www.html5gamedevs.com/topic/14991-ios-iframe-focus-problem/ Try, whether it can solve your issue and let us know. Link to comment Share on other sites More sharing options...
MichaelD Posted September 25, 2015 Share Posted September 25, 2015 iOS9 has many issues at the moment, have you tried with the 9.1 update that launched yesterday? Link to comment Share on other sites More sharing options...
Riddik Posted September 26, 2015 Author Share Posted September 26, 2015 MichaelD, yes, but the issue still present Tom Atom, thanks, I'll going to try this on Monday. Link to comment Share on other sites More sharing options...
Riddik Posted September 28, 2015 Author Share Posted September 28, 2015 Tom Atom, I've called "window.focus();" after ad close - unfortunately it didn't help and the iOS 9 issue is still there :( I figure out that the problem is on sponsor side.The game places into an iframe, and after show ad the iframe loses focus. Perhaps some divs overlaps the game div or something else. Is it possible to return focus back to the iframe? Link to comment Share on other sites More sharing options...
MichaelD Posted September 28, 2015 Share Posted September 28, 2015 Is the iframe loaded through https? because ios9 doesn't allow loading http domains now. Link to comment Share on other sites More sharing options...
Tom Atom Posted September 28, 2015 Share Posted September 28, 2015 I've called "window.focus();" after ad close - unfortunately it didn't help and the iOS 9 issue is still there Just add this as global object:var PhaserGlobal = { stopFocus: true}I had the same problem with iOS (iOS8) - once the focus was lost I never got it back again (game was also in iframe). This global object hepled me - give it exactly the name as it is here and place it in code before game is created. Calling windows.focus did not help me. Link to comment Share on other sites More sharing options...
Riddik Posted September 29, 2015 Author Share Posted September 29, 2015 Thanks again, but I can't say that method works or not, because we found out that the issue is something between iOS9 and the Gamesplaza Portal Base Template (test portal). Is the iframe loaded through https? because ios9 doesn't allow loading http domains now. Indeed the iframe is loaded through http. Thank you for this point! Link to comment Share on other sites More sharing options...
Recommended Posts