How to play sounds in JavaScript
I have the following:
<audio id="clickdown-wav" src="ClickDown.wav" preload="auto"></audio>
and then in my JavaScript, I:
var ClickDown = $('#clickdown-wav')[0]; $(document).delegate('a','click',function() { ClickDown.play(); });
The problem is that it is not too fast (on the iPad) when I click on the anchor tags. There is a noticeable time lag when I click on the anchor tag and the wav file is played.
Q: Is there only source code for playing sounds from JavaScript? Clickdown.wav is only 1k.
+6