Nicht Eric Nicht Eric - 11 months ago 57
PHP Question

Video playing from the host so it doesn't start from the beginning when reloading

Is it possible to have for example a video playing from the host server, so when someone is going on my website the video is instead of starting at 0:00, at that point where it is on the host server. What I'm trying to say is that the video is always synchronized with the one on the server so even if I reload the site its still synchronized and not starting from the beginning. It's hard to explain because my English is not that good. I hope you understand the issue I'm having
Thanks

Answer Source

How do you save your video? Do you have any place to put additional infos like the point your video is at? If not, you will probably have to use a defined starting point in time and then calculate at what time it should currently be. (like

$start = time() - $starttime;  //uses unix timestamps
$start = $start % $lengthOfVideo;

You will then have to manually set the values for $starttime and $lengthOfVideo. The former should be any point in time on which the video will start at 0:00. $lengthOfVideois the length of the desired video in seconds.

How to start the video at a special time depends again on the way you have saved your video and what player you use. Youtube for instance let's you encode the starting time in it's url.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download