diff options
author | MaZderMind | 2015-02-27 17:21:51 +0100 |
---|---|---|
committer | MaZderMind | 2015-02-27 17:21:51 +0100 |
commit | 18031079f5ca57cdac6aa4ab4c236182329bc1f7 (patch) | |
tree | 0a63e5861033f3a689af1da4d20ddcf519afee59 /pages | |
parent | ea0e8de1c5d132103010ba5aaf98ecb162f66358 (diff) |
Work on Room-Page
Diffstat (limited to '')
-rw-r--r-- | pages/room.php | 40 |
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 |