Merge branch 'develop' into feature/stream

Conflicts:
	controllers/FrontController.php
This commit is contained in:
Pierre Rudloff 2016-04-10 19:45:54 +02:00
commit 8f14843bb4

View file

@ -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');
}
}