Answers for "how to play audio using javascript in html5"

13

play audio in javascript

var audio = new Audio('audio_file.mp3');
audio.play();
Posted by: Guest on May-20-2020
1

play audio source on html

<audio controls>
  <source src="myAudio.mp3" type="audio/mpeg">
  <source src="myAudio.ogg" type="audio/ogg">
  <p>Your browser doesn't support HTML5 audio. Here is
     a <a href="myAudio.mp4">link to the audio</a> instead.</p>
</audio>
Posted by: Guest on February-17-2021

Code answers related to "how to play audio using javascript in html5"

Browse Popular Code Answers by Language