aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.php
diff options
context:
space:
mode:
authorMaZderMind2014-10-19 13:44:34 +0200
committerMaZderMind2014-10-19 13:44:34 +0200
commitce98e5359797c26be23c5db9a786fbd1e58acc7d (patch)
treeccad65d7be7cc4224fe7415b015bd294528d7807 /lib/helper.php
parente94c9bcce4dffc0bb1bbf64be9dac4ec4925b554 (diff)
direct links to video formats
Diffstat (limited to 'lib/helper.php')
-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']))