From ca0ad31572ed0bd0ed4c044dd9ed6ce307a80d98 Mon Sep 17 00:00:00 2001 From: Simeon Keske Date: Tue, 9 Jun 2020 21:24:18 +0200 Subject: make cdn configurable --- model/Stream.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'model/Stream.php') diff --git a/model/Stream.php b/model/Stream.php index 0abfed2..22b73b6 100644 --- a/model/Stream.php +++ b/model/Stream.php @@ -135,10 +135,10 @@ class Stream switch($proto) { case 'webm': - return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'_'.rawurlencode($selection).'.webm'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], 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($selection).'.m3u8'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'_'.rawurlencode($selection).'.m3u8']); } return null; @@ -203,10 +203,10 @@ class Stream switch($proto) { case 'mp3': - return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'.mp3'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'.mp3']); case 'opus': - return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'.opus'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], rawurlencode($this->getRoom()->getStream()).'_'.rawurlencode($this->getLanguage()).'.opus']); } return null; @@ -237,10 +237,10 @@ class Stream switch($proto) { case 'mp3': - return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'.mp3'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], rawurlencode($this->getRoom()->getStream()).'.mp3']); case 'opus': - return proto().'://cdn.c3voc.de/'.rawurlencode($this->getRoom()->getStream()).'.opus'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], rawurlencode($this->getRoom()->getStream()).'.opus']); default: return null; @@ -267,6 +267,6 @@ class Stream ); } public function getPoster() { - return proto().'://cdn.c3voc.de'.joinpath(['/thumbnail', $this->getRoom()->getStream(), 'poster.jpeg']); + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], 'thumbnail', $this->getRoom()->getStream(), 'poster.jpeg']); } } -- cgit v1.2.3