Otherwise a browser based game with doodle-jump style play would not be possible. If you'd like to test this just put a simple audio player that loops on your page and click play: Įverywhere I searched it is being said that this isn't possible, so it is nice to see there is at least some way to do it even if a bit of a hack. I've done a barebones test and it seems that the way they are looping the audio in the street scene is what keeps it from going to sleep. I've spent some time taking a closer look at how they might be keeping the phone from going to sleep. Visit from your iphone and when you get to the buildings/street scene with music playing in the background just leave your phone alone.
They seem to be doing it somehow in this site. Is there any documented method or hack to do this? I need to do this in mobile safari for a game like Doodle Jump where the user may not touch the screen for an extended period of time. In an iOS app you can set application.idleTimerDisabled = YES to prevent the phone from auto locking.