rescue of raum
This commit is contained in:
@@ -70,9 +70,9 @@ function source($dir, $file, $mime=NULL) {
|
|||||||
if (!$mime) $type=mime_content_type($path);
|
if (!$mime) $type=mime_content_type($path);
|
||||||
else $type='video/'.$mime;
|
else $type='video/'.$mime;
|
||||||
echo '<source src="'.$URL.'&play=1'.($mime?'&mime='.$mime:'')
|
echo '<source src="'.$URL.'&play=1'.($mime?'&mime='.$mime:'')
|
||||||
.'" type="'.$type.'">';
|
.'" type="'.$type.'">'."\n";
|
||||||
} else {
|
} else {
|
||||||
return '';
|
echo "Not Found: $path for $mime";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ function fileRange($path, $size, $mime) {
|
|||||||
$size)); // Total size of the file
|
$size)); // Total size of the file
|
||||||
|
|
||||||
// It's time to output the file
|
// It's time to output the file
|
||||||
$f = fopen($file, 'rb'); // Open the file in binary mode
|
$f = fopen($path, 'rb'); // Open the file in binary mode
|
||||||
$chunkSize = 8192; // The size of each chunk to output
|
$chunkSize = 8192; // The size of each chunk to output
|
||||||
|
|
||||||
// Seek to the requested start range
|
// Seek to the requested start range
|
||||||
@@ -124,7 +124,7 @@ function output($path) {
|
|||||||
fileRange($path, $size, $mime);
|
fileRange($path, $size, $mime);
|
||||||
} else {
|
} else {
|
||||||
header('Content-Length: ' . $size);
|
header('Content-Length: ' . $size);
|
||||||
@readfile($file);
|
@readfile($path);
|
||||||
@ob_flush();
|
@ob_flush();
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
@@ -138,6 +138,7 @@ function ext($file, $newext) {
|
|||||||
|
|
||||||
/** Show a video player for the given video */
|
/** Show a video player for the given video */
|
||||||
function player($video) {
|
function player($video) {
|
||||||
|
global $DIR, $CONVERT;
|
||||||
$URL=pageUrl();
|
$URL=pageUrl();
|
||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
Reference in New Issue
Block a user