1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 16:51:16 +01:00

Fix: safari

This commit is contained in:
Alexander Pankratov 2023-09-02 22:22:09 +02:00
parent 42d521e8b4
commit 6625c6d8a0

View File

@ -106,14 +106,15 @@ final class ResponseInfo
}
$seek_start = empty($seek_start) ? 0 : \abs(\intval($seek_start));
/*if ($range !== '') {
$isSafari = !empty($headers['user-agent']) && preg_match('/^((?!chrome|android).)*safari/i', $headers['user-agent']);
if ($range !== '' && $isSafari) {
//Safari video streaming fix
$length = ($seek_end - $seek_start + 1);
$maxChunkSize = 10 * 1024 ** 2;
if ($length > $maxChunkSize) {
$seek_end = $seek_start + $maxChunkSize - 1;
}
}*/
}
$this->serve = $method !== 'HEAD';
if ($seek_start > 0 || $seek_end < $size - 1) {