javascript - Sound won't play if invoked on ajax success function -



javascript - Sound won't play if invoked on ajax success function -

i have sound clip embedded in mobile web page so:

<audio id="sound"> <source src="/assets/sound/mysound.mp3" type="audio/mpeg"> </audio>

i phone call so:

$('#sound').get(0).play();

this works fine on chrome in both laptop , iphone. however, if phone call within success function of ajax so

$.ajax({ .... success: function() { $('#sound').get(0).play(); }

on chrome browser of laptop, works fine. on chrome or safari in ios, no sound played.

anyone else run this?

ios places restrictions on when/how can play sound in web apps. example, can't auto-play sounds, have initiated user-event (tapping button, etc).

check out more info: http://www.ibm.com/developerworks/library/wa-ioshtml5/#n100e8

javascript ios audio

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -