From ce98e5359797c26be23c5db9a786fbd1e58acc7d Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 19 Oct 2014 13:44:34 +0200 Subject: direct links to video formats --- lib/helper.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/helper.php') 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'])) -- cgit v1.2.3