i am trying to make mp4 videos seek-able
the video is located on different server then the PHP file
regarding headers it send all correct info
but the problem is that fseek does not support remote video
i tried to use stream_get_contents instead
stream_get_contents($fp, $start);
fseek($fp, $start);
the video it self already converted and ready to stream
any idea how can that be done ?
thanks
In order to start reading the content of $fp
from a different offset you should use the 3rd parameter of the function:
string stream_get_contents ( resource $handle [, int $maxlength = -1 [, int $offset = -1 ]] )
In your case:
stream_get_contents($fp, -1, $start);
(in your original code you set the second parameter to $start, which is wrong).
Keep in mind that not all streaming support offset, so it might not work.