From 870bacae02c922c795b2af4e39839c279168768b Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Thu, 28 Dec 2017 12:27:51 +0100 Subject: serve simple webm as fallback for multiquality player --- model/Stream.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'model/Stream.php') 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; -- cgit v1.2.3