aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2014-11-09 22:53:16 +0100
committerMaZderMind2014-11-09 22:53:16 +0100
commit7da876b75ee3307e400eab65e6206c8dca7cf56a (patch)
tree75eb1fa9701b54bb9b0a87533915949fe81fbe3e
parentffbff5eb16a30b673d0c8296068cce230c510ca3 (diff)
minirooms (aka sendezentrum)
Diffstat (limited to '')
-rw-r--r--.htaccess17
-rw-r--r--room.php4
-rw-r--r--template/assemblies/switcher/miniroom-audio.phtml12
-rw-r--r--template/assemblies/switcher/miniroom-video.phtml40
-rw-r--r--template/room.phtml52
5 files changed, 102 insertions, 23 deletions
diff --git a/.htaccess b/.htaccess
index 75851ea..2165afc 100644
--- a/.htaccess
+++ b/.htaccess
@@ -9,10 +9,10 @@ RewriteCond %{REQUEST_FILENAME} !-l
DirectoryIndex index.php
# /room/ -> room.php - native av-player in hq (with format switcher included)
-RewriteRule ^(saal1|saal2|saalg|saal6)/?$ room.php?room=$1&format=hq&language=native& [L]
+RewriteRule ^(saal1|saal2|saalg|saal6)/?$ room.php?room=$1&format=hq&language=native [L]
-# /room/ -> room.php - translated av-player in hq (with format switcher included)
-RewriteRule ^(saal1|saal2|saalg|saal6)/translated/?$ room.php?room=$1&format=hq&language=translated& [L]
+# /room/translated -> room.php - translated av-player in hq (with format switcher included)
+RewriteRule ^(saal1|saal2|saalg|saal6)/translated/?$ room.php?room=$1&format=hq&language=translated [L]
# /room/format/ -> room.php - native av-player in $format (with format switcher included)
RewriteRule ^(saal1|saal2|saalg|saal6)/(hd|lq|audio|slides)/?$ room.php?room=$1&format=$2&language=native [L]
@@ -20,8 +20,17 @@ RewriteRule ^(saal1|saal2|saalg|saal6)/(hd|lq|audio|slides)/?$ room.php?room=$1&
# /room/format/translated -> room.php - translated av-player in $format (with format switcher included)
RewriteRule ^(saal1|saal2|saalg|saal6)/(hd|lq|audio|slides)/translated/?$ room.php?room=$1&format=$2&language=translated [L]
+
+# /miniroom/ -> room.php - native av-player in hq
+RewriteRule ^(sendezentrum)/?$ room.php?room=$1&format=hq&language=native [L]
+
+# /miniroom/format/ -> room.php - native av-player in $format (no hd, no slides)
+RewriteRule ^(sendezentrum)/(lq|audio)/?$ room.php?room=$1&format=$2&language=native [L]
+
+
# /party/ -> player.php - simple audio-player for party
-RewriteRule ^(lounge|ambient|sendezentrum)/?$ party.php?room=$1&format=audio [L]
+RewriteRule ^(lounge|ambient)/?$ party.php?room=$1&format=audio [L]
+
# Show a known page in case of as miss
ErrorDocument 404 404.php
diff --git a/room.php b/room.php
index 43bddcc..9d98f04 100644
--- a/room.php
+++ b/room.php
@@ -53,4 +53,8 @@ echo $tpl->render(array(
'language' => $language,
'translated' => ($language == 'translated'),
'format' => $format,
+
+ // miniroom = no hd, no translation, no slides, no irc, no program
+ // -> sendezentrum, workshops
+ 'miniroom' => in_array($room, array('sendezentrum')=,
));
diff --git a/template/assemblies/switcher/miniroom-audio.phtml b/template/assemblies/switcher/miniroom-audio.phtml
new file mode 100644
index 0000000..f96fb71
--- /dev/null
+++ b/template/assemblies/switcher/miniroom-audio.phtml
@@ -0,0 +1,12 @@
+<h3>Directlinks</h3>
+<ul>
+ <? foreach(array('mp3', 'ogg', 'opus') as $iter): ?>
+ <li>
+ <span class="label filetype"><?=h(strtoupper($iter))?></span>
+ <a href="<?=h(link_stream('audio', $room, $iter))?>">
+ <span class="fa fa-volume-up"></span>
+ live podcast
+ </a>
+ </li>
+ <? endforeach ?>
+</ul>
diff --git a/template/assemblies/switcher/miniroom-video.phtml b/template/assemblies/switcher/miniroom-video.phtml
new file mode 100644
index 0000000..619d50b
--- /dev/null
+++ b/template/assemblies/switcher/miniroom-video.phtml
@@ -0,0 +1,40 @@
+<h3>Formats</h3>
+<ul>
+ <? foreach(array('hq', 'lq') as $iter): ?>
+ <li>
+ <span class="label filetype"><?=h(strtoupper($iter))?></span>
+ <a href="<?=h(link_player($room, $iter))?>">
+ <span class="fa fa-video-camera"></span>
+ live video-podcast
+ </a>
+ </li>
+ <? endforeach ?>
+</ul>
+
+<hr />
+
+<? foreach(array('rtmp', 'hls') as $protocol): ?>
+ <h3>Directlinks (<?=h(strtoupper($protocol))?>)</h3>
+ <ul>
+ <? foreach(array('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-video-camera"></span>
+ live video-podcast
+ </a>
+ </li>
+ <? endforeach ?>
+ </ul>
+<? endforeach ?>
+
+<h3>Directlinks (WebM)</h3>
+<ul>
+ <li>
+ <span class="label filetype">HQ</span>
+ <a href="<?=h(link_stream('webm', $room, 'webm'))?>">
+ <span class="fa fa-video-camera"></span>
+ live video-podcast
+ </a>
+ </li>
+</ul>
diff --git a/template/room.phtml b/template/room.phtml
index 6c26730..78d470d 100644
--- a/template/room.phtml
+++ b/template/room.phtml
@@ -2,7 +2,13 @@
<h1><?=h($title)?></h1>
<ul class="nav nav-tabs nav-justified">
- <? foreach(array('video', 'audio', 'slides') as $iter): ?>
+ <?
+ if($miniroom)
+ $tabs = array('video', 'audio', 'slides');
+ else
+ $tabs = array('video', 'audio');
+ ?>
+ <? foreach($tabs as $iter): ?>
<li
<? if($type == $iter):?>class="active"<? endif ?>
>
@@ -17,27 +23,35 @@
<? include("assemblies/player/$type.phtml") ?>
</div>
- <ul class="nav nav-tabs nav-justified" role="tablist">
- <li class="active">
- <a href="#switcher" role="tab" data-toggle="tab">Formats</a>
- </li>
- <li>
- <a href="#irc" role="tab" data-toggle="tab">IRC</a>
- </li>
- <li>
- <a href="#program" role="tab" data-toggle="tab">Program</a>
- </li>
- </ul>
+ <? if(!$miniroom): ?>
+ <ul class="nav nav-tabs nav-justified" role="tablist">
+ <li class="active">
+ <a href="#switcher" role="tab" data-toggle="tab">Formats</a>
+ </li>
+ <li>
+ <a href="#irc" role="tab" data-toggle="tab">IRC</a>
+ </li>
+ <li>
+ <a href="#program" role="tab" data-toggle="tab">Program</a>
+ </li>
+ </ul>
+ <? endif ?>
<div class="tab-content">
<div class="tab-pane active" id="switcher">
- <? include("assemblies/switcher/$type.phtml") ?>
- </div>
- <div class="tab-pane" id="irc">
- <? include("assemblies/irc.phtml") ?>
- </div>
- <div class="tab-pane" id="program">
- <? include("assemblies/program.phtml") ?>
+ <? if($miniroom): ?>
+ <? include("assemblies/switcher/miniroom-$type.phtml") ?>
+ <? else: ?>
+ <? include("assemblies/switcher/$type.phtml") ?>
+ <? endif ?>
</div>
+ <? if(!$miniroom): ?>
+ <div class="tab-pane" id="irc">
+ <? include("assemblies/irc.phtml") ?>
+ </div>
+ <div class="tab-pane" id="program">
+ <? include("assemblies/program.phtml") ?>
+ </div>
+ <? endif ?>
</div>
</div>