starttime); $end_time = toTimestamp($rrec->endtime ); $duration = $end_time - $start_time; $size = 3 * 1024 * 1024 * $duration; // 1秒あたり3MBと仮定 header('Content-type: video/mpeg'); header('Content-Disposition: inline; filename="'.$rrec->path.'"'); header('Content-Length: ' . $size ); ob_clean(); flush(); $fp = @fopen( INSTALL_PATH.SPOOL."/".$rrec->path, "r" ); if( $fp !== false ) { ob_start(null,4096); $status = array(); do { echo fread( $fp, 4096 ); if( feof( $fp ) ) break; $status = ob_get_status(); } while( $status['status'] != PHP_OUTPUT_HANDLER_END ); } fclose($fp); } catch(exception $e ) { exit( $e->getMessage() ); } ?>