Reputation: 409
I am getting nuts a little bit.
I am working on SoundJS app for an alarm. The user will share a link and when somebody click on it, after the user defined time the alarm will sound.
I have this link: http://online-timer.en.downloadastro.com/tools/?PageSpeed=off#5000
I am using SoundJS 0.6.2 (which should be the latest)
But the alarm not working in iOS, it works perfectly in Android and PC. Works ok on my MacBook. but not on the iPhone. Please advice
Upvotes: 0
Views: 195
Reputation: 409
Well on GitHub and in Slack an answere was given.
This is an iOS limitation, and some of the Android have it too.
This issue is because I must "unlock" the web audio context on iOS using a mousedown/touchend event. In SoundJS 0.6.2, any document-level click/touchend will do it (so there is nothing extra that is need to be done). Earlier versions required to do some additional manual steps (which can still be seen in the MobileSafe demo in GitHub, which is not necessary any more).
Upvotes: 1