mysterbx Posted February 17, 2010 Share Posted February 17, 2010 Hello, i'v recently found a video steeaming script on the web, modified it a bit... everything works like it should, but when the video is being loaded, my site doesnt work, nothing loads up till the video is being loaded... Here is the code im using: ob_end_clean(); set_time_limit(0); $filesize=@filesize($file)-(($position>0)?$position+1:0); $filedate=@filemtime($file); $fileopen=@fopen($file,"r"); header("Content-Type: video/x-flv"); header("Content-Disposition: attachment; filename=\"".$filename."\""); header("Content-Length: ".$filesize); if($position!=0){ @fseek($fileopen,$position); print("FLV"); print(pack("C",1)); print(pack("C",1)); print(pack("N",9)); print(pack("N",9)); } while(!(connection_aborted() || connection_status() == 1) && $bytes_sent<$filesize){ print(fread($fileopen,$limit_download_rate*1042)); $bytes_sent=($limit_download_rate+$bytes_sent); flush(); ob_flush(); sleep(1); } @fclose($fileopen); @exit(); what could be the problem with it? i have been working more than a few hours and i could figure out what is wrong with it. please help me out here Link to comment https://forums.phpfreaks.com/topic/192441-video-streaming-lag/ Share on other sites More sharing options...
sader Posted February 17, 2010 Share Posted February 17, 2010 use ajax or maybe iframe Link to comment https://forums.phpfreaks.com/topic/192441-video-streaming-lag/#findComment-1014012 Share on other sites More sharing options...
mysterbx Posted February 17, 2010 Author Share Posted February 17, 2010 the whole server lags up, those kinds of things wouldnt help Link to comment https://forums.phpfreaks.com/topic/192441-video-streaming-lag/#findComment-1014014 Share on other sites More sharing options...
mysterbx Posted February 18, 2010 Author Share Posted February 18, 2010 anyone? Link to comment https://forums.phpfreaks.com/topic/192441-video-streaming-lag/#findComment-1014217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.