You could define all of the audio files for your application by adding
<audio> element and set the
src attribute to the name of the audio file:
var audio = $("<audio>"); audio.src = "2C.mp3";
Next, we add an event handler to get notified when the audio file has finished loading. There are two events that we can use. The
canplay event is fired as soon as the browser has enough data to start playing the audio. The
canplaythrough event is fired after the file has been ...