aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pages/room.php40
1 files changed, 30 insertions, 10 deletions
diff --git a/pages/room.php b/pages/room.php
index 64ca86e..e743d30 100644
--- a/pages/room.php
+++ b/pages/room.php
@@ -4,50 +4,70 @@ require_once('lib/bootstrap.php');
$room = $_GET['room'];
$language = $_GET['language'];
-$format = $_GET['format'];
+$selection = $_GET['selection'];
-switch($format) {
+switch($selection) {
case 'audio':
$type = 'audio';
+ $title = 'Audio';
+ break;
+
+ case 'music':
+ $type = 'audio';
+ $title = 'Music';
break;
case 'slides':
$type = 'slides';
+ $title = 'Slides';
break;
case 'hd':
$type = 'video';
+ $title = 'FullHD Video';
$width = 1920;
$height = 1080;
break;
case 'sd':
$type = 'video';
+ $title = 'SD Video';
$width = 1024;
$height = 576;
break;
}
-echo $tpl->render(array(
- 'page' => 'room',
- 'title' => $GLOBALS['CONFIG']['ROOMS'][$room].' – '.$GLOBALS['CONFIG']['FORMATS'][$format],
+$formats = get("ROOMS.$room.FORMATS");
+$types = array();
+
+if(count(array_intersect(array('rtmp-sd', 'rtmp-hd', 'hls-sd', 'hls-hd', 'webm-sd', 'webm-hd'), $formats)) > 0)
+ $types[] = 'video';
- 'rooms' => $GLOBALS['CONFIG']['ROOMS'],
- 'formats' => $GLOBALS['CONFIG']['FORMATS'],
+if(count(array_intersect(array('audio-mp3', 'audio-opus'), $formats)) > 0)
+ $types[] = 'audio';
+if(count(array_intersect(array('slides'), $formats)) > 0)
+ $types[] = 'slides';
+
+
+echo $tpl->render(array(
+ 'page' => 'room',
+
+ 'title' => get("ROOMS.$room.DISPLAY").' – '.$title,
'room' => $room,
- 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room],
'program' => program(),
'type' => $type,
+ 'types' => $types,
+
'width' => @$width,
'height' => @$height,
'language' => $language,
'translated' => ($language == 'translated'),
- 'format' => $format,
- 'hlsformat' => ($format == 'sd' ? 'auto' : $format),
+ 'selection' => $selection,
+ 'hlsformat' => ($selection == 'hd' ? 'auto' : $selection),
// miniroom = no translation, no slides, no irc, no program
// -> sendezentrum, workshops