I have a website that plays sound when you click a button.
This is how I do it
function PlaySound(soundfile) {
$('#soundContainer').html("<embed src='/uploads/sounds/" + soundfile + "' hidden=true autostart=true loop=false>");
}
How do you preload the sound file beforehand?
Thank you.