title: Play video through php script inside HTML5 video tag
body: <p>Can someone kindly let me know what I am missing here? I want to play a video using html5 video tag by calling a php script. I don't want to display the source of the video directly.</p>
  
  <p>HTML file: video.html</p>
  
  <pre><code>&lt;video width="400" controls&gt;
  &lt;source src="getVideo.php" type="video/mp4"&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>PHP file: getVideo.php</p>
  
  <pre><code>&lt;?php
          $file_name = 'media/abc_video.mp4';
          $file_size = (string)(filesize($file_name));
          header('Content-Type: video/mp4');
          header('Content-Length: '.$file_size);
          readfile($file_name);
  ?&gt;
  </code></pre>
  
  <p>The html page is not loading video, only a blank video player ...</p>
  
  <p>I am able to play the video directly so permission should be working:</p>
  
  <p>HTML file: video.html</p>
  
  <pre><code>&lt;video width="400" controls&gt;
  &lt;source src="media/abc_video.mp4" type="video/mp4"&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>Many thanks,</p>