parent
8bb838ef74
commit
6cd8eeed4a
2 changed files with 5 additions and 4 deletions
|
@ -27,6 +27,7 @@ use Symfony\Component\Process\Process;
|
||||||
* @property-read array $rtmp_conn
|
* @property-read array $rtmp_conn
|
||||||
* @property-read string|null $_type Object type (usually "playlist" or null)
|
* @property-read string|null $_type Object type (usually "playlist" or null)
|
||||||
* @property-read stdClass $downloader_options
|
* @property-read stdClass $downloader_options
|
||||||
|
* @property-read stdClass $http_headers
|
||||||
*/
|
*/
|
||||||
class Video
|
class Video
|
||||||
{
|
{
|
||||||
|
|
|
@ -164,11 +164,11 @@ class DownloadController extends BaseController
|
||||||
$response = $response->withHeader('Content-Type', 'video/'.$this->video->ext);
|
$response = $response->withHeader('Content-Type', 'video/'.$this->video->ext);
|
||||||
$body = new Stream($this->video->getM3uStream());
|
$body = new Stream($this->video->getM3uStream());
|
||||||
} else {
|
} else {
|
||||||
|
$headers = (array) $this->video->http_headers;
|
||||||
$range = $request->getHeader('Range');
|
$range = $request->getHeader('Range');
|
||||||
if (empty($range)) {
|
|
||||||
$headers = [];
|
if (!empty($range)) {
|
||||||
} else {
|
$headers['Range'] = $range;
|
||||||
$headers = ['Range' => $range];
|
|
||||||
}
|
}
|
||||||
$stream = $this->video->getHttpResponse($headers);
|
$stream = $this->video->getHttpResponse($headers);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue