title: html5 video on Android 4: play fullscreen then redirect to another webpage - not working
body: <p>I'm designing an html5 page for Android 4 smartphones with a single 3gpp (or mp4) video that has to autoplay fullscreen when opened; when video ends should redirect to another url .</p>
  
  <p>Some googling told me that autoplay is no more allowed on Android 4, so I chose to display a poster image the user has to click to start the video.
  Then:</p>
  
  <ol>
  <li>fullscreen mode is invoked  </li>
  <li>video should automatically start
  (was indeed started by user clicking on poster image)  </li>
  <li>when video finish to play Android should exit fullscreen   </li>
  <li>and finally redirect user to anothe page.</li>
  </ol>
  
  <p>2 and 3 are not working: after invoking fullscreen the user have do another "click" to start video and when video ends exitfullscreen does not work (screen is black and user have to press "back" key on the phone to exit from the phone's video player).</p>
  
  <p>Looks like <code>video.webkitExitFullScreen()</code> and <code>video.play()</code> are ignored on Android 4.</p>
  
  <p>This is the html5 markup and javascript code I'm using, could you please help pointing me to a solution?</p>
  
  <p>Thanks!</p>
  
  <pre><code>    &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width; initial-scale=1.0" /&gt;
      &lt;meta name="description" content="" /&gt;
      &lt;title&gt;test&lt;/title&gt;
  
      &lt;script type="text/javascript"&gt;
  
          function videoEnd() {
              var video = document.getElementById("video");
              video.webkitExitFullScreen();
              document.location = "http://www.google.com";
          }
  
          function playVideo() {
              var video = document.getElementById("video");
              video.addEventListener('ended', videoEnd, false);
              video.webkitEnterFullScreen();
              video.play();
          }
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;video id="video" poster="../img/image.jpg" onclick="playVideo();"&gt;
          &lt;source src="../video/videoname.3gp" type="video/3gpp" /&gt;
      &lt;/video&gt;
  &lt;/body&gt;
  </code></pre>