2014-10-01 14:42:22 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
2014-11-09 19:28:50 +00:00
|
|
|
|
require_once('lib/bootstrap.php');
|
2014-10-01 14:42:22 +00:00
|
|
|
|
|
2015-02-28 18:12:27 +00:00
|
|
|
|
|
2014-10-01 14:42:22 +00:00
|
|
|
|
$room = $_GET['room'];
|
|
|
|
|
$language = $_GET['language'];
|
2015-02-27 16:21:51 +00:00
|
|
|
|
$selection = $_GET['selection'];
|
2014-10-01 14:42:22 +00:00
|
|
|
|
|
2015-02-28 18:12:27 +00:00
|
|
|
|
$formats = get("ROOMS.$room.FORMATS");
|
|
|
|
|
|
|
|
|
|
$selections = array();
|
|
|
|
|
$tabs = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(count(array_intersect(array('rtmp-hd', 'hls-hd', 'webm-hd'), $formats)) > 0)
|
|
|
|
|
$selections[] = 'hd';
|
|
|
|
|
|
|
|
|
|
if(count(array_intersect(array('rtmp-sd', 'hls-sd', 'webm-sd'), $formats)) > 0)
|
|
|
|
|
$selections[] = 'sd';
|
|
|
|
|
|
|
|
|
|
if(count(array_intersect(array('rtmp-sd', 'rtmp-hd', 'hls-sd', 'hls-hd', 'webm-sd', 'webm-hd'), $formats)) > 0)
|
|
|
|
|
$tabs[] = 'video';
|
|
|
|
|
|
|
|
|
|
if(count(array_intersect(array('audio-mp3', 'audio-opus'), $formats)) > 0)
|
|
|
|
|
$selections[] = $tabs[] = 'audio';
|
|
|
|
|
|
|
|
|
|
if(count(array_intersect(array('slides'), $formats)) > 0)
|
|
|
|
|
$selections[] = $tabs[] = 'slides';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// default page
|
|
|
|
|
if(!$selection)
|
|
|
|
|
$selection = $selections[0];
|
|
|
|
|
|
|
|
|
|
if(!in_array($selection, $selections)) {
|
|
|
|
|
include('404.php');
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2015-02-27 16:21:51 +00:00
|
|
|
|
switch($selection) {
|
2014-10-01 14:42:22 +00:00
|
|
|
|
case 'audio':
|
2015-02-28 18:12:27 +00:00
|
|
|
|
$tab = 'audio';
|
2015-02-27 16:21:51 +00:00
|
|
|
|
$title = 'Audio';
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'music':
|
2015-02-28 18:12:27 +00:00
|
|
|
|
$tab = 'audio';
|
2015-02-27 16:21:51 +00:00
|
|
|
|
$title = 'Music';
|
2014-10-01 14:42:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'slides':
|
2015-02-28 18:12:27 +00:00
|
|
|
|
$tab = 'slides';
|
2015-02-27 16:21:51 +00:00
|
|
|
|
$title = 'Slides';
|
2014-10-01 14:42:22 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2014-10-02 14:19:15 +00:00
|
|
|
|
case 'hd':
|
2015-02-28 18:12:27 +00:00
|
|
|
|
$tab = 'video';
|
2015-02-27 16:21:51 +00:00
|
|
|
|
$title = 'FullHD Video';
|
2014-10-01 14:42:22 +00:00
|
|
|
|
$width = 1920;
|
|
|
|
|
$height = 1080;
|
|
|
|
|
break;
|
|
|
|
|
|
2014-11-14 11:47:54 +00:00
|
|
|
|
case 'sd':
|
2015-02-28 18:12:27 +00:00
|
|
|
|
$tab = 'video';
|
2015-02-27 16:21:51 +00:00
|
|
|
|
$title = 'SD Video';
|
2014-10-01 14:42:22 +00:00
|
|
|
|
$width = 1024;
|
|
|
|
|
$height = 576;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-28 18:12:27 +00:00
|
|
|
|
if($language == 'translated')
|
|
|
|
|
$title = 'Translated '.$title;
|
2015-02-27 16:21:51 +00:00
|
|
|
|
|
|
|
|
|
echo $tpl->render(array(
|
|
|
|
|
'page' => 'room',
|
|
|
|
|
|
|
|
|
|
'title' => get("ROOMS.$room.DISPLAY").' – '.$title,
|
2014-10-01 14:42:22 +00:00
|
|
|
|
'room' => $room,
|
|
|
|
|
|
2014-11-03 20:53:30 +00:00
|
|
|
|
'program' => program(),
|
|
|
|
|
|
2015-02-28 18:12:27 +00:00
|
|
|
|
'tab' => $tab,
|
|
|
|
|
'tabs' => $tabs,
|
2015-02-27 16:21:51 +00:00
|
|
|
|
|
2014-10-01 14:42:22 +00:00
|
|
|
|
'width' => @$width,
|
|
|
|
|
'height' => @$height,
|
2014-10-19 10:12:20 +00:00
|
|
|
|
'language' => $language,
|
2014-10-19 11:44:34 +00:00
|
|
|
|
'translated' => ($language == 'translated'),
|
2015-02-27 16:21:51 +00:00
|
|
|
|
'selection' => $selection,
|
|
|
|
|
'hlsformat' => ($selection == 'hd' ? 'auto' : $selection),
|
2015-02-28 18:12:27 +00:00
|
|
|
|
'formats' => $formats,
|
2014-10-01 14:42:22 +00:00
|
|
|
|
));
|