logo

This tutorial will show, using simple JavaScript, how easily you can control when audio will start. Whether to loop the file may also be controlled. The audio file on this page will start in 20 seconds and repeat. The audio and script should be placed in the body section

These are the considerations whem using this method
  1. audio file start can be delayed
  2. audio file will loop if desired
    • write the audio code like this if no loop is desired
  3. <audio src="dolby.mp3" id="my_audio"></audio>
  4. The audio and script id's can be of your choosing are required and MUST match
  5. the audio src is the path to your audio file

home Valid CSS! HTML Hit Counter