title: iPad 1 fires video ended event before the video finishes playing
body: <p>I have a container with a video element and a navigation menu.  The nav is hidden until the video finishes playing, at which point the video is hidden and the navigation becomes visible.  This works perfectly on the desktop.  However, on the iPad, the video does not get to finish playing before the "ended" event apparently finishes.</p>
  
  <p>Also, because you can't autoplay a video element in iOS, I also catch the play event to hide the controls after the video has started. I left this in, just in case someone knows an issue it causes.  It still happens with that bit removed though.</p>
  
  <p>Is there a work around for this behavior?  I could not find anything about this issue. It seems to me that the video plays with some lag, and the ended event fires after the calculated duration, regardless of how long it actually takes to complete, although this is just speculation.  The only thing I'm sure of is that the video is not done playing when the ended event fires.  I am testing on an iPad 1 running Safari on iOS 5.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="home-nav"&gt;
      &lt;video autoplay controls width="870" height="489" id="home-video"&gt;
          &lt;source src="home_1.mp4" type="video/mp4" /&gt;
      &lt;/video&gt;
      &lt;div id="nav-overlay"&gt;
          &lt;a class="link" href="#"&gt;Link 1&lt;/a&gt;
          &lt;a class="link" href="#"&gt;Link 2&lt;/a&gt;
          &lt;a class="link" href="#"&gt;Link 3&lt;/a&gt;
          &lt;a class="link" href="#"&gt;Link 4&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;&lt;!-- /home-nav --&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>$(function(){
      var overlay = $('#nav-overlay');
      var homevideo = $('#home-video');
      overlay.hide();
      homevideo.bind('ended', function(){
          homevideo.hide();
          overlay.show();
      });
      homevideo.bind('play', function(){
          homevideo[0].removeAttribute("controls");
          homevideo[0].currentTime = 0.1;
      });
  });
  </code></pre>