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