Add fallback to bestvideo and worstvideo (fixes #288)
This commit is contained in:
parent
4ef7a93dce
commit
29756cf290
3 changed files with 23 additions and 17 deletions
|
@ -31,7 +31,7 @@ abstract class BaseController
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $defaultFormat = 'best[protocol=https]/best[protocol=http]';
|
||||
protected $defaultFormat = 'best/bestvideo';
|
||||
|
||||
/**
|
||||
* Slim dependency container.
|
||||
|
@ -74,8 +74,9 @@ abstract class BaseController
|
|||
$this->sessionSegment = $session->getSegment(self::class);
|
||||
$this->localeManager = $this->container->get('locale');
|
||||
|
||||
if ($this->config->stream) {
|
||||
$this->defaultFormat = 'best';
|
||||
if (!$this->config->stream) {
|
||||
// Force HTTP if stream is not enabled.
|
||||
$this->defaultFormat = Config::addHttpToFormat($this->defaultFormat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue