Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to add and play sounds in JS

PlaySound = function () {
    var audio = new Audio('~/Content/Sound/Down.mp3');
    audio.loop = false;
    audio.play(); 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #add #play #sounds #JS
ADD COMMENT
Topic
Name
4+9 =