Merge branch 'develop' into feature/stream
Conflicts: controllers/FrontController.php
This commit is contained in:
commit
8f14843bb4
1 changed files with 9 additions and 10 deletions
|
@ -112,6 +112,9 @@ class FrontController
|
|||
if (isset($params["url"])) {
|
||||
if (isset($params['audio'])) {
|
||||
try {
|
||||
try {
|
||||
return $this->getStream($params["url"], 'bestaudio', $response, $request);
|
||||
} catch (\Exception $e) {
|
||||
$video = $this->download->getJSON($params["url"]);
|
||||
|
||||
//Vimeo needs a correct user-agent
|
||||
|
@ -120,10 +123,6 @@ class FrontController
|
|||
$video->http_headers->{'User-Agent'}
|
||||
);
|
||||
$url_info = parse_url($video->url);
|
||||
|
||||
try {
|
||||
return $this->getStream($params["url"], 'bestaudio', $response, $request);
|
||||
} catch (\Exception $e) {
|
||||
if ($url_info['scheme'] == 'rtmp') {
|
||||
ob_end_flush();
|
||||
header(
|
||||
|
@ -246,7 +245,7 @@ class FrontController
|
|||
try {
|
||||
return $this->getStream($params["url"], $params["format"], $response, $request);
|
||||
} catch (\Exception $e) {
|
||||
$response->getBody()->write($e->getMessage().PHP_EOL);
|
||||
$response->getBody()->write($e->getMessage());
|
||||
return $response->withHeader('Content-Type', 'text/plain');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue