diff --git a/classes/Video.php b/classes/Video.php index f368385..5eec8e6 100644 --- a/classes/Video.php +++ b/classes/Video.php @@ -592,6 +592,13 @@ class Video $client = new Client(); $urls = $this->getUrl(); - return $client->request('GET', $urls[0], ['stream' => true, 'headers' => $headers]); + return $client->request( + 'GET', + $urls[0], + [ + 'stream' => true, + 'headers' => array_merge((array) $this->http_headers, $headers) + ] + ); } } diff --git a/controllers/DownloadController.php b/controllers/DownloadController.php index b3f3f3c..bf10ea5 100644 --- a/controllers/DownloadController.php +++ b/controllers/DownloadController.php @@ -166,7 +166,7 @@ class DownloadController extends BaseController $response = $response->withHeader('Content-Type', 'video/' . $this->video->ext); $body = new Stream($this->video->getM3uStream()); } else { - $headers = (array) $this->video->http_headers; + $headers = []; $range = $request->getHeader('Range'); if (!empty($range)) {