How to stream on website video ready?

There are ready-made video, you need to stream this video on a website using PSHP, it was impossible to rewind. Is it possible? Are there any ready libraries or services? Or maybe you know how to implement this.
April 4th 20 at 00:59
2 answers
April 4th 20 at 01:01
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Content-Type: {$file->getMimetype()}");
header("Content-Disposition: inline; filename=".$filename.";");
header("Content-Length: ".strlen($file_content));

echo $file_content;
a little do not understand what next to do, for example, I can content-length write size is not the entire file, and slice. How to make it without shutting down load the video pieces? Get something like the stream. - alta_Gottli commented on April 4th 20 at 01:04
@alta_Gottliwhy invent something?! - Christop91 commented on April 4th 20 at 01:07
@alta_Gottli, just like you have take the stream using this code.
Parts - it takes the player. - Christop91 commented on April 4th 20 at 01:10
@Christop91still don't understand) So I can rewind - alta_Gottli commented on April 4th 20 at 01:13
@alta_Gottlialready tried to do?!)
it was impossible to rewind.
I remembered when I wrote the answer. ;) - Christop91 commented on April 4th 20 at 01:16
@Christop91, I ran your code, but it works like a normal video. - alta_Gottli commented on April 4th 20 at 01:19
@alta_Gottli, and I have works: check via sniffing packets. - Christop91 commented on April 4th 20 at 01:22
@Christop91, and how to get variable file_content?Using file_get_content()? - alta_Gottli commented on April 4th 20 at 01:25
@alta_Gottli, programmer - me or You? - Christop91 commented on April 4th 20 at 01:28
@Christop91, well, you completee me, and your code)) - alta_Gottli commented on April 4th 20 at 01:31
@alta_Gottli, Oh. Such programmers today, Yes?!)))
Well know:
1. How is the playback of the file in stages?
2. What in my code is responsible for what and where it is used?

...And do not expect ready solution for copy and paste. - Christop91 commented on April 4th 20 at 01:34
@Christop91, Oh you...
I can't help you) - alta_Gottli commented on April 4th 20 at 01:37
@alta_Gottli, strlen () is from here and think)) - Christop91 commented on April 4th 20 at 01:40
@Christop91, the size of a file, the result will display all the videos - alta_Gottli commented on April 4th 20 at 01:43
@alta_Gottliwill not immediately, if it will be played through the player: long-pooling. - Christop91 commented on April 4th 20 at 01:46
April 4th 20 at 01:03
As the path of least resistance to try to stream via youtube and output the video stream via an API on your site, read the Doc and the thread on stackoverflow.

Find more questions by tags PHPVideo broadcast