title: jQuery, Html5 audio player submit form after finished
body: <p>Is there a way to detect html5 audio player when finished?</p>
  
  <p>I'd like to submit a form after the audio is finished.</p>
  
  <pre><code>    &lt;audio controls&gt;
        &lt;source src="horse.ogg" type="audio/ogg"&gt;      
        Your browser does not support the audio tag.
      &lt;/audio&gt; 
  
      $( document ).ready(function() {
      // when audio finished
          $(".form_sub #submit").trigger('click');
      });
  &lt;form class="form_sub"&gt;
  &lt;input type="submit" value="Submit" name="submit" id="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><a href="http://codepen.io/anon/pen/waGVMR" rel="nofollow">Demo</a></p>