0

I am trying to use PHP as a proxy to hide a download location and to stream video files. The code is very simple, like this:

<?php
$url = "https://OTHER-SERVER/video.mp4";
$fp = fopen($url, 'rb');
foreach (get_headers($url) as $header){
    header($header);
}
fpassthru($fp);
?>

Then I just load it through a html5 video tag like this:

<video width="400" controls>
  <source src="http://myserver/fpassthru.php" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

The problem is this setup for some reason doesn't allow skipping inside the video file forward or backwards? It seems like if you skip forward it has to download the entire video before allowing the skip.

Is there anything that could be done about this to enable easy skipping?

binnathon
  • 111
  • 8

0 Answers0