diff options
author | MaZderMind | 2014-10-19 13:44:34 +0200 |
---|---|---|
committer | MaZderMind | 2014-10-19 13:44:34 +0200 |
commit | ce98e5359797c26be23c5db9a786fbd1e58acc7d (patch) | |
tree | ccad65d7be7cc4224fe7415b015bd294528d7807 /lib/helper.php | |
parent | e94c9bcce4dffc0bb1bbf64be9dac4ec4925b554 (diff) |
direct links to video formats
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 15 |
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'])) |