play audio source on html

59

how do you play audio files on html -

<audio src="sound.mp3" autoplay></audio>

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>

Comments

Submit
0 Comments