Fast javascript play sound code
In order to play a sound assets with Javascript you just need these snippet:
var sound = new Audio("my_sound.mp3"); // buffers automatically when created
$('#button').click(function(){
sound.play();
});
Another Web Development Blog
In order to play a sound assets with Javascript you just need these snippet:
var sound = new Audio("my_sound.mp3"); // buffers automatically when created
$('#button').click(function(){
sound.play();
});
No comments yet.