Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

play audio with js

function play() {
  var audio = new Audio('https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3');
  audio.play();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #play #audio #js
ADD COMMENT
Topic
Name
5+2 =