aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorAnton Schubert2017-12-28 12:27:51 +0100
committerMaZderMind2018-01-24 23:37:34 +0100
commit870bacae02c922c795b2af4e39839c279168768b (patch)
treea5c00c247df0d718ad5f0135f5702575bdc996f6 /model
parentd29fa327630533e31a0b7bdea3c8bc25ef19e5ac (diff)
serve simple webm as fallback for multiquality player
Diffstat (limited to 'model')
-rw-r--r--model/Stream.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/model/Stream.php b/model/Stream.php
index 99abaf1..1c63227 100644
--- a/model/Stream.php
+++ b/model/Stream.php
@@ -123,15 +123,19 @@ class Stream
]);
}
- public function getVideoUrl($proto)
+ public function getVideoUrl($proto, $selection=null)
{
+ if (!$selection) {
+ $selection = $this->getSelection();
+ }
+
switch($proto)
{
case 'webm':
- return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'_'.rawurlencode($this->getSelection()).'.webm';
+ return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'_'.rawurlencode($selection).'.webm';
case 'hls':
- return proto().'://cdn.c3voc.de/hls/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'_'.rawurlencode($this->getSelection()).'.m3u8';
+ return proto().'://cdn.c3voc.de/hls/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'_'.rawurlencode($selection).'.m3u8';
}
return null;