Merge branch 'issue349_previewseek'

This commit is contained in:
Jerry Russell 2017-11-16 20:19:59 +00:00
commit 30c9cc0a18
1 changed files with 10 additions and 4 deletions

View File

@ -70,11 +70,17 @@ class Application_Common_FileIO
ob_end_flush(); ob_end_flush();
} }
// NOTE: We can't use fseek here because it does not work with streams
// (a.k.a. Files stored in the cloud) //These two lines were removed from Airtime 2.5.x at some point after Libretime forked from Airtime.
while(!feof($fm) && (connection_status() == 0)) { //These lines allow seek to work for files.
//Issue #349
$cur = $begin;
fseek($fm,$begin,0);
while(!feof($fm) && (connection_status() == 0) && ($cur <= $end)) {
echo fread($fm, 1024 * 8); echo fread($fm, 1024 * 8);
} }
fclose($fm); fclose($fm);
} }
} }