iOS sounds start only after specific user action


I know that mobile browsers are quite strict with auto-starting sounds. A user action has to be triggered first.

The thing is that although the user is clicking on page elements (GUI buttons, html divs) to start playing, the sounds don’t start but are cached.

They start playing only when the user checked/unchecked a checkbox in the Options menu (top-left).

Tried to trigger a click on a checkbox with jQuery but with no success.

Any ideas?

Playing your game on an iPad seems alright to me. I mean I select a planet, click on the start button on the bottom and then I hear sounds playing.

The PlayCanvas engine automatically handles playing sounds on iOS, by subscribing to the ‘touchend’ event on the window and playing a dummy inaudible sound. So you shouldn’t have to do anything.

Tried it on an iPhone 6, and sounds start playing correctly.

On my iPhone 5c, though, the problem remains. I will continue experimenting, and try to isolate the problem if it is related to my device only.

Thanks for the info on the inner workings.