title: mp4 from PHP - Not playing in HTML5 Video tag
body: <p>I am using the video tag to play videos.</p>
  
  <p>I using php files for the playback like this:</p>
  
  <pre><code>    &lt;video id="playvideo" preload="auto" width="845" height="395" 
      poster="http://video-js.zencoder.com/oceans-clip.png"&gt;
  
      &lt;source src="../getvideo_webm.php" type='video/webm' /&gt;
      &lt;source src="../getvideo_mp4.php" type='video/mp4'/&gt;
      &lt;source src="../getvideo_ogv.php" type='video/ogg' /&gt;
  
      &lt;/video&gt;
  </code></pre>
  
  <p>All .php files are playing fine when i check them directly in the brower.
  But the above setup with all .php as source files will not play.
  If i give a straight .mp4 source it will play fine.</p>
  
  <p>The getvideo_mp4.php looks like this:</p>
  
  <pre><code> $path = 'oceans-clip.mp4';
   if (file_exists($path))
   {
   $size=filesize($path);
   $fm=@fopen($path,'rb');
   if(!$fm) {
   // You can also redirect here
   header ("HTTP/1.0 404 Not Found");
   die();
   }
   $begin=0;
   $end=$size;
   if(isset($_SERVER['HTTP_RANGE'])) {
   if(preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i',   
   $_SERVER['HTTP_RANGE'],$matches)){
   $begin=intval($matches[0]);
   if(!empty($matches[1])) {
   $end=intval($matches[1]);
   }
   }
   }
   if($begin&gt;0||$end&lt;$size)
   header('HTTP/1.0 206 Partial Content');
   else
   header('HTTP/1.0 200 OK');
   header("Content-Type: video/mp4");
   header('Accept-Ranges: bytes');
   header('Content-Length:'.($end-$begin));
   header("Content-Disposition: inline;");
   header("Content-Range: bytes $begin-$end/$size");
   header("Content-Transfer-Encoding: binary\n");
   header('Connection: close');
   $cur=$begin;
   fseek($fm,$begin,0);
   while(!feof($fm)&amp;&amp;$cur&lt;$end&amp;&amp;(connection_status()==0))
   { print fread($fm,min(1024*16,$end-$cur));
   $cur+=1024*16;
   usleep(1000);
   }
   die();
   }
  </code></pre>
  
  <p>So what am i doing wrong ?</p>