Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript autoplay audio

var source = "audio/burger.mp3"
 var audio = document.createElement("audio");
 //
 audio.autoplay = true;
 //
 audio.load()
 audio.addEventListener("load", function() { 
     audio.play(); 
 }, true);
 audio.src = source;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #autoplay #audio
ADD COMMENT
Topic
Name
3+9 =