openfl

Open full view…

Playing sounds doesn't work on iPhone (HTML5)

hcwdikk
Sat, 10 May 2014 16:56:39 GMT

Just as the title says, sounds just don't work on iPhone :( There are no errors in the console. I have tried both my personal project and PiratePig sample.

hcwdikk
Sat, 10 May 2014 19:55:28 GMT

Okay, I have found a solution :D In order to enable sounds on iOS you have to play any sound once on begin touch event (or mouse down) and then all other sounds will work just fine :)

Joshua Granick
Sun, 11 May 2014 06:25:06 GMT

Which version of iOS is this, and does this work with a standard mouse event and sound.play(), or do you need to do anything else that is special? :) Thanks!

hcwdikk
Sun, 11 May 2014 09:07:15 GMT

iOS 7.1, standard mouse event + sound.play does the job. I found some more information on this and it seems to be a common issue on iDevices: http://paulbakaus.com/tutorials/html5/web-audio-on-ios/