title: How do you detect when HTML5 audio has finished playing (more than once)?
body: <p>I am having a problem detecting when an  tag is finished playing an mp3. When I do something like this:</p>
  
  <pre><code>     myAudio.addEventListener("ended", function() 
       {
            alert("ended");
       });
  </code></pre>
  
  <p>It only occurs the first time the audio is played. When I play the audio again, nothing happens. The same thing happens when I use the <code>onended=doThis();</code> method. I've heard maybe there is a way to do it in jQuery, but I haven't been able to get it to work. I've also heard there might be a way to fix it by changing the audio div <code>id</code> every time the mp3 is played, but this doesn't work for me because I need the <code>id</code> to stay the same.</p>
  
  <p>Did anyone get any ideas?</p>