title: iOS JavaScript Video - webkitCancelFullScreen(); does not work
body: <p>I'm trying to exit full screen after playing a video in Xcode simulator through web view from html page using JavaScript but it does not work.</p>
  
  <p>I'm using below code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
  
  &lt;script type="text/javascript"&gt;
  
      function finishVideo() {
  
         var myVideo = document.getElementsByTagName('video')[0];
  
          myVideo.webkitCancelFullScreen();
  
      }
  
      // add listener function to ended event --&gt;
  
      function myAddListener(){
  
      var myVideo = document.getElementsByTagName('video')[0];
  
      myVideo.addEventListener('ended',finishVideo,false);
  
  
      }
  
    &lt;/script&gt;
  
   &lt;/head&gt;
  
  &lt;body onLoad="myAddListener()"&gt;
  
    &lt;video controls
  
    src="http://homepage.mac.com/qt4web/A-chord.m4v"&gt;
  
     &lt;/video&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>