title: Exiting Fullscreen With The HTML5 Video Tag
body: <p>I'm trying to get the video to exit fullscreen at the end of the video but it won't. I searched and found ways to do this but for the life of me I can't get it to work. I'm testing in the latest version of Chrome (15) and iOS 5 on the iPad2.
  Here's the code I'm using:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="http://code.jquery.com/jquery-2.1.3.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
    $("#myVideoTag").on('ended', function(){
      webkitExitFullScreen();
    });
  });
  
  &lt;/script&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;title&gt;854x480&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;video  width="854" height="480"
          src="video/854x480-Template_1.mp4"
          poster="images/poster.jpg"
          id="myVideoTag"
          type="video/mp4"
          preload="auto"
          autobuffer
          controls&gt;
    &lt;p&gt;Requires HTML5 capable browser.&lt;/p&gt;
  &lt;/video&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any help will be appreciated.</p>