aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 6139a18..23bf051 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -17,6 +17,21 @@ function link_player($room, $format, $translated = false)
return rawurlencode($room).'/'.($isDefaultFormat ? '' : rawurlencode($format).'/').($translated ? 'translated/' : '');
}
+function link_stream($protocol, $room, $format, $translated = false)
+{
+ $language = $translated ? 'translated' : 'native';
+
+ switch ($protocol) {
+ case 'rtmp':
+ return 'rtmp://rtmp.streaming.media.ccc.de:1935/stream/'.rawurlencode($room).'_'.rawurlencode($language).'_'.rawurlencode($format);
+
+ case 'hls':
+ return 'http://hls.streaming.media.ccc.de/hls/'.rawurlencode($room).'_'.rawurlencode($language).'_'.rawurlencode($format).'.m3u8';
+ }
+
+ return '#';
+}
+
function baseurl()
{
if(isset($GLOBALS['CONFIG']['baseurl']))