title: Audio element error in Chrome: no "ended" event and negative time elapsed
body: <p>I have the following HTML and JS:  </p>
  
  <pre><code>&lt;script&gt;
    function onEnded(ev) {
      window.location.reload();
    }
  &lt;/script&gt;
  
  &lt;audio id="audio-element" controls autoplay onended="onEnded();"&gt;
    &lt;source src="/stream/3" type="audio/mp3" /&gt;
  &lt;/audio&gt;
  </code></pre>
  
  <p>For some MP3 streams, this works perfectly; playback starts and when the audio track ends <code>onEnded</code> is called. For others, playback starts fine and the audio file is played, but then right at the end the elapsed time counter goes extremely negative, the <code>ended</code> event never fires and <code>audio_element.ended</code> returns <code>false</code>. Here's a screenshot:  </p>
  
  <p><img src="https://i.stack.imgur.com/kjLBY.png" alt="Chrome audio player error">  </p>
  
  <p>This happens in Chrome, but not Safari or Firefox, which behave as expected. Any idea what I can do in Chrome to make the <code>ended</code> event fire?</p>