Answers for "play a song in js"

0

play a sound in js

// inside JS File
setTimeout(() => {
  document.getElementById('mySound').play();
}, 500)

// inside HTML File
<audio id="mySound" src="sound.mp3"></audio>
Posted by: Guest on January-23-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language