diff options
author | Simeon Keske | 2020-06-09 21:24:18 +0200 |
---|---|---|
committer | Anton Schubert | 2020-06-14 15:24:18 +0200 |
commit | ca0ad31572ed0bd0ed4c044dd9ed6ce307a80d98 (patch) | |
tree | ced4704e0a25adcf36ceab042c8986cd65cfa9eb /model/Stream.php | |
parent | 755401983fea4d3f8cf781bf305b9df713904486 (diff) |
make cdn configurable
Diffstat (limited to '')
-rw-r--r-- | model/Stream.php | 14 |
1 files changed, 7 insertions, 7 deletions
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']); } } |