0

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

Alex Frenkel
  • 409
  • 5
  • 15

1 Answers1

1

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).

Alex Frenkel
  • 409
  • 5
  • 15
  • Do you know how to unlock the sound in iOS? I have a mute/unmute button, therefore there is an "click" event handler..but sound doesn't seem to play for ios. – Antonios Tsimourtos Dec 06 '18 at 08:31
  • Well this question was really old, but I dont think anything changed. you cannot play sound withoul explisit click – Alex Frenkel Dec 18 '18 at 12:01