Playing Html5 Audio In Ajax Response In Ios
After a lot of googling and researching, I have found out that iOS blocks autoplaying of html5 audio and video. Audio and Video can only be played as a response to a click event.
Solution 1:
I know this is an ancient question, but for people coming across this there is a straightforward solution which is to play a short, silent sound directly from the click handler. Ideally, this would be a sound file you have already fetched and cached.
After that you'll be able to initiate playback from other handlers, even those without direct user interaction. (such as your AJAX/XHR response)
Post a Comment for "Playing Html5 Audio In Ajax Response In Ios"