title: How can I redirect to a URL after a HTML video has ended?
body: <p>I am trying to redirect to a different URL after a html video has ended. This cannot be using a FLASH player as it won't work on iOS devices. Any help or direction will be appreciated. Here is my code:</p>
  
  <p> 
   </p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript"&gt;
      myVid = document.getElementById("video1");
      function redirect()
      { 
          if (myVid.ended == true) {
              window.location = "http://www.google.com";
          }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt; 
      &lt;video id="video1" controls="controls"&gt;
          &lt;source src="video.mp4" type="video/mp4"&gt;
          Your browser does not support HTML5 video.
      &lt;/video&gt;
  &lt;/body&gt; 
  </code></pre>
  
  <p></p>