From b5f7004080f2ddf89e672aaa8ddb197703f8cf74 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Thu, 2 Oct 2014 16:19:15 +0200 Subject: player setup --- config.php | 8 ++++++++ formats.php | 8 +------- player.php | 13 ++++++++----- template/player-video.phtml | 30 ++++++++++++++++++++++++++++++ template/player.phtml | 2 ++ 5 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 template/player-video.phtml create mode 100644 template/player.phtml diff --git a/config.php b/config.php index efcae3a..0837b84 100644 --- a/config.php +++ b/config.php @@ -12,4 +12,12 @@ $GLOBALS['CONFIG']['ROOMS'] = array( 'sendezentrum' => 'Sendezentrum', ); +$GLOBALS['CONFIG']['FORMATS'] = array( + 'hd' => 'FullHD', + 'hq' => 'High Quality', + 'lq' => 'Low Quality', + 'audio' => 'Audio-Only', + 'slides' => 'Slide-Images + Audio', +); + ?> diff --git a/formats.php b/formats.php index df2a4c8..4084804 100644 --- a/formats.php +++ b/formats.php @@ -14,11 +14,5 @@ echo $tpl->render(array( 'subtitle' => $GLOBALS['CONFIG']['ROOMS'][$room], 'room' => $room, - 'formats' => array( - 'hd' => 'FullHD', - 'hq' => 'High Quality', - 'lq' => 'Low Quality', - 'audio' => 'Audio-Only', - 'slides' => 'Slide-Images + Audio', - ), + 'formats' => $GLOBALS['CONFIG']['FORMATS'], )); diff --git a/player.php b/player.php index 6afdb5f..f41c0a2 100644 --- a/player.php +++ b/player.php @@ -17,19 +17,19 @@ switch($format) { $type = 'slides'; break; - case 'hq': + case 'hd': $type = 'video'; $width = 1920; $height = 1080; break; - case 'hd': + case 'hq': $type = 'video'; $width = 1024; $height = 576; break; - case 'ld': + case 'lq': $type = 'video'; $width = 640; $height = 360; @@ -38,9 +38,12 @@ switch($format) { $tpl = new PhpTemplate('template/page.phtml'); echo $tpl->render(array( - 'page' => $type, + 'page' => 'player', + 'playertype' => $type, + 'baseurl' => baseurl(), - 'title' => 'Rooms', + 'title' => $GLOBALS['CONFIG']['ROOMS'][$room], + 'subtitle' => $GLOBALS['CONFIG']['FORMATS'][$format], 'room' => $room, 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room], diff --git a/template/player-video.phtml b/template/player-video.phtml new file mode 100644 index 0000000..824a776 --- /dev/null +++ b/template/player-video.phtml @@ -0,0 +1,30 @@ + diff --git a/template/player.phtml b/template/player.phtml new file mode 100644 index 0000000..f663213 --- /dev/null +++ b/template/player.phtml @@ -0,0 +1,2 @@ +A Player:
+ \ No newline at end of file -- cgit v1.2.3