diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/Room.php | 6 | ||||
-rw-r--r-- | model/Stream.php | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/model/Room.php b/model/Room.php index b0f700a..28c60c6 100644 --- a/model/Room.php +++ b/model/Room.php @@ -48,7 +48,7 @@ class Room } public function getThumb() { - return proto().'://cdn.c3voc.de'.joinpath(['/thumbnail', $this->getStream(), 'thumb.jpeg']); + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], 'thumbnail', $this->getStream(), 'thumb.jpeg']); } public function getLink() { @@ -201,11 +201,11 @@ class Room } public function getHLSPlaylistUrl() { - return proto().'://cdn.c3voc.de/hls/'.rawurlencode($this->getStream()).'_native_hd.m3u8'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], 'hls', rawurlencode($this->getStream()).'_native_hd.m3u8']); } public function getDashManifestUrl() { - return proto().'://cdn.c3voc.de/dash/'.rawurlencode($this->getStream()).'/manifest.mpd'; + return proto().'://'.joinpath([$GLOBALS['CONFIG']['CDN'], 'dash', rawurlencode($this->getStream()).'/manifest.mpd']); } public function getDashTech() { 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']); } } |