Closed sedubois closed 7 years ago
OK, I need to dig more. When I restart from the Player example, I manage to keep a looping sound working even with iOS screen locked.
Got it working! No idea why it didn't work when building it myself, but I kept things working by incrementally modifying the player example (bell + silence + bell, all working on my iPhone with iOS 10.3 with screen locked).
Hi! I'm working on a meditation timer and got quite desperate until I found this promising library 🙂
At its most basic level, a meditation timer needs to wait for a while, then play a bell at the end. (and in the complete workflow, it'll be a guided meditation audio + silence + bell(s).)
This waiting time needs to be configurable. On most platforms, the easiest is just to use setTimeout then play a howl at the end, this works. It even works on my iPhone, when the screen is kept unlocked. But it must also work when the screen gets auto-locked after a few seconds (or if the meditator locks the screen manually).
The only way around this really is I guess to play the whole thing as a single audio sequence. Howler seems to have most of the pieces to allow this kind of thing: I can create a sprite which contains both silence (e.g 10 seconds) and the bell sound, then I just need a way to tell Howler to play the silence X times and finish with the bell. But Howler would need to go further and build a single sound file from all these pieces, then play this.
Is there any way to achieve this scenario currently, or could it possibly be implemented somehow? Or do you know alternatives to solve the described issue? It seems I'm quite blocked on this subject of having a functional timer webapp working on iOS. Thanks a lot!