aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/helper.php15
-rw-r--r--room.php1
-rw-r--r--template/assemblies/players/audio.phtml (renamed from template/players/audio.phtml)1
-rw-r--r--template/assemblies/players/slides.phtml (renamed from template/players/slides.phtml)1
-rw-r--r--template/assemblies/players/video.phtml (renamed from template/players/video.phtml)9
-rw-r--r--template/assemblies/switcher/video.phtml23
-rw-r--r--template/room.phtml2
7 files changed, 45 insertions, 7 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']))
diff --git a/room.php b/room.php
index 0750cdc..383a896 100644
--- a/room.php
+++ b/room.php
@@ -53,5 +53,6 @@ echo $tpl->render(array(
'width' => @$width,
'height' => @$height,
'language' => $language,
+ 'translated' => ($language == 'translated'),
'format' => $format,
));
diff --git a/template/players/audio.phtml b/template/assemblies/players/audio.phtml
index e3c85c9..f9993c1 100644
--- a/template/players/audio.phtml
+++ b/template/assemblies/players/audio.phtml
@@ -1,4 +1,5 @@
<pre><?=print_r(array(
+ 'file' => basename(__FILE__),
'room' => $room,
'language' => $language,
'format' => $format
diff --git a/template/players/slides.phtml b/template/assemblies/players/slides.phtml
index e3c85c9..f9993c1 100644
--- a/template/players/slides.phtml
+++ b/template/assemblies/players/slides.phtml
@@ -1,4 +1,5 @@
<pre><?=print_r(array(
+ 'file' => basename(__FILE__),
'room' => $room,
'language' => $language,
'format' => $format
diff --git a/template/players/video.phtml b/template/assemblies/players/video.phtml
index e3c85c9..ca0e87b 100644
--- a/template/players/video.phtml
+++ b/template/assemblies/players/video.phtml
@@ -1,10 +1,10 @@
<pre><?=print_r(array(
+ 'file' => basename(__FILE__),
'room' => $room,
'language' => $language,
'format' => $format
), true)?></pre>
-<?/*
<video
autoplay="autoplay"
controls="controls"
@@ -15,19 +15,19 @@
>
<source
data-plugin-type="flash"
- src="rtmp://rtmp.streaming.media.ccc.de:1935/stream/<?=h($room)?>_<?=h($language)?>_<?=h($format)?>"
+ src="<?=h(link_stream('rtmp', $room, $format, $translated))?>"
title="h.H264 (RTMP)"
type="video/rtmp"
/>
<source
data-plugin-type="native"
- src="http://hls.streaming.media.ccc.de/hls/<?=h($room)?>_<?=h($language)?>_<?=h($format)?>.m3u8"
+ src="<?=h(link_stream('hls', $room, $format, $translated))?>"
title="h.264 (HLS)"
type="application/vnd.apple.mpegURL"
/>
<object
- data="static/flashmediaelement.swf"
+ data="/assets/js/lib/flashmediaelement.swf"
type="application/x-shockwave-flash"
width="<?=h($width)?>"
height="<?=h($height)?>"
@@ -35,4 +35,3 @@
<param name="allowFullScreen" value="true">
</object>
</video>
-*/?>
diff --git a/template/assemblies/switcher/video.phtml b/template/assemblies/switcher/video.phtml
index ccfbaef..6ad26c8 100644
--- a/template/assemblies/switcher/video.phtml
+++ b/template/assemblies/switcher/video.phtml
@@ -1,4 +1,4 @@
-<h3>Video</h3>
+<h3>Formate</h3>
<ul>
<? foreach(array('hd', 'hq', 'lq') as $iter): ?>
<li>
@@ -14,3 +14,24 @@
</li>
<? endforeach ?>
</ul>
+
+<hr />
+
+<? foreach(array('rtmp', 'hls') as $protocol): ?>
+ <h3>Direktlinks (<?=h(strtoupper($protocol))?>)</h3>
+ <ul>
+ <? foreach(array('hd', 'hq', 'lq') as $iter): ?>
+ <li>
+ <span class="label filetype"><?=h(strtoupper($iter))?></span>
+ <a href="<?=h(link_stream($protocol, $room, $iter))?>">
+ <span class="fa fa-flag-o"></span>
+ native
+ </a>
+ <a href="<?=h(link_stream($protocol, $room, $iter, true))?>">
+ <span class="fa fa-flag"></span>
+ translated
+ </a>
+ </li>
+ <? endforeach ?>
+ </ul>
+<? endforeach ?>
diff --git a/template/room.phtml b/template/room.phtml
index 9574d59..81e3af8 100644
--- a/template/room.phtml
+++ b/template/room.phtml
@@ -15,7 +15,7 @@
<div class="tab-content">
- <? include("players/$type.phtml") ?>
+ <? include("assemblies/players/$type.phtml") ?>
<div class="switcher">
<? include("assemblies/switcher/$type.phtml") ?>
</div>