title: Play a JavaScript sound file without a delay
body: <p>I have a HTML5 canvas game with sounds, but one of the problems that I am running into is that when the sound is played, all other action stops until the sound has finished playing. I used this code</p>
  
  <pre><code>document.getElementById("music").innerHTML="&lt;embed src=\""+surl+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" /&gt;"
  </code></pre>
  
  <p><br>
  Where surl is the url of the sound and music of the span element that is playing the music.
  Does anyone know how to play a sound without delaying the entire program?<br></p>
  
  <p><br>
  I tried it with a considerably larger file, and it turns out that while it DOES play in the background, there is still a considerable delay between starting the sound and continuing the game.</p>