diff options
author | MaZderMind | 2014-10-19 20:47:58 +0200 |
---|---|---|
committer | MaZderMind | 2014-10-19 20:47:58 +0200 |
commit | aa10d8d0e776506397403c2221704133d05b6e0f (patch) | |
tree | 103279962404b31fc72d9566a664fae423f15772 | |
parent | 48d947b34e87a26ba8bdbc55861bb6cd451a3ccc (diff) |
icecast/webm support
-rw-r--r-- | lib/helper.php | 3 | ||||
-rw-r--r-- | template/assemblies/player/video.phtml | 11 | ||||
-rw-r--r-- | template/assemblies/switcher/video.phtml | 15 |
3 files changed, 27 insertions, 2 deletions
diff --git a/lib/helper.php b/lib/helper.php index 23bf051..8951948 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -27,6 +27,9 @@ function link_stream($protocol, $room, $format, $translated = false) case 'hls': return 'http://hls.streaming.media.ccc.de/hls/'.rawurlencode($room).'_'.rawurlencode($language).'_'.rawurlencode($format).'.m3u8'; + + case 'icecast': + return 'http://webm.streaming.media.ccc.de:8000/'.rawurlencode($room).'_'.rawurlencode($language).'.'.rawurlencode($format); } return '#'; diff --git a/template/assemblies/player/video.phtml b/template/assemblies/player/video.phtml index defb14d..7ff6969 100644 --- a/template/assemblies/player/video.phtml +++ b/template/assemblies/player/video.phtml @@ -1,16 +1,23 @@ <div style="width: 100%; height: 100%; max-width: <?=h($width)?>px; margin: 0 auto;"> <video autoplay="autoplay" - id="video-tag" preload="auto" width="<?=h($width)?>" height="<?=h($height)?>" style="width: 100%; height: 100%;" > + <? if($format == 'hq'): ?> + <source + data-plugin-type="native" + src="<?=h(link_stream('icecast', $room, $format, $translated))?>" + title="WebM (Icecast)" + type="video/webm" + /> + <? endif ?> <source data-plugin-type="flash" src="<?=h(link_stream('rtmp', $room, $format, $translated))?>" - title="h.H264 (RTMP)" + title="h.264 (RTMP)" type="video/rtmp" /> <source diff --git a/template/assemblies/switcher/video.phtml b/template/assemblies/switcher/video.phtml index 6ad26c8..1ecf0f6 100644 --- a/template/assemblies/switcher/video.phtml +++ b/template/assemblies/switcher/video.phtml @@ -35,3 +35,18 @@ <? endforeach ?> </ul> <? endforeach ?> + +<h3>Direktlinks (WebM)</h3> +<ul> + <li> + <span class="label filetype">HQ</span> + <a href="<?=h(link_stream('icecast', $room, 'hq'))?>"> + <span class="fa fa-flag-o"></span> + native + </a> + <a href="<?=h(link_stream('icecast', $room, 'hq', true))?>"> + <span class="fa fa-flag"></span> + translated + </a> + </li> +</ul> |