crisl Posted February 1, 2010 Share Posted February 1, 2010 Hello, i've got a problem with one of my script: here is the code ignore_user_abort(false); header("Content-Type: " . $ressource['mimetype']); header('Content-length: ' . $taille); header('Content-Disposition: filename="' . $file_name . '"'); header('Cache-Control: no-cache'); $fp = fopen($file,"rb"); $taillefichier = filesize($file); $offset = 0; while(!feof($fp)) { $meuh = fread($fp,8192-$offset); echo $meuh; if(feof($fp)) { $offset = $taillefichier; } } This script is created to simulate a video streaming, i use a flash player http://www.longtailvideo.com/players/jw-flv-player/ to read the stream. In my page, i have a link to previous and next video and the video player My problem is: when reading a file, if i try to click to request viewing a new video, the browser have to wait all the video loading. If the video takes 5 mins to load all the video stream, the browser is hanging during 5 minutes, then it load the new video... Can you help me? Thanks in advance for your help Christophe Link to comment https://forums.phpfreaks.com/topic/190515-continous-execution-client-logout/ Share on other sites More sharing options...
redarrow Posted February 1, 2010 Share Posted February 1, 2010 There nothing really can be done, I think using ajax might read the time of delay, then show a pic or count down that it bro. Link to comment https://forums.phpfreaks.com/topic/190515-continous-execution-client-logout/#findComment-1004914 Share on other sites More sharing options...
crisl Posted February 2, 2010 Author Share Posted February 2, 2010 Did you mean that there is no solution to my problem? It's quite strange that all peoples that stream videos with php are facing the same problem. :'( Link to comment https://forums.phpfreaks.com/topic/190515-continous-execution-client-logout/#findComment-1005359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.