aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.php9
-rw-r--r--formats.php2
-rw-r--r--index.php9
-rw-r--r--player.php53
4 files changed, 62 insertions, 11 deletions
diff --git a/config.php b/config.php
index 224ed57..efcae3a 100644
--- a/config.php
+++ b/config.php
@@ -3,4 +3,13 @@
// guessed automatically
// $GLOBALS['CONFIG']['baseurl'] = 'http://foo.com/bar/';
+$GLOBALS['CONFIG']['ROOMS'] = array(
+ 'saal1' => 'Saal 1',
+ 'saal2' => 'Saal 2',
+ 'saalg' => 'Saal G',
+ 'saalz' => 'Saal Z',
+ 'lounge' => 'Lounge',
+ 'sendezentrum' => 'Sendezentrum',
+);
+
?>
diff --git a/formats.php b/formats.php
index 5d66f08..df2a4c8 100644
--- a/formats.php
+++ b/formats.php
@@ -11,7 +11,7 @@ echo $tpl->render(array(
'page' => 'formats',
'baseurl' => baseurl(),
'title' => 'Stream-Formats',
- 'subtitle' => ucfirst($room),
+ 'subtitle' => $GLOBALS['CONFIG']['ROOMS'][$room],
'room' => $room,
'formats' => array(
diff --git a/index.php b/index.php
index a51165f..607c76e 100644
--- a/index.php
+++ b/index.php
@@ -10,12 +10,5 @@ echo $tpl->render(array(
'baseurl' => baseurl(),
'title' => 'Rooms',
- 'rooms' => array(
- 'saal1' => 'Saal 1',
- 'saal2' => 'Saal 2',
- 'saalg' => 'Saal G',
- 'saalz' => 'Saal Z',
- 'lounge' => 'Lounge',
- 'sendezentrum' => 'Sendezentrum',
- ),
+ 'rooms' => $GLOBALS['CONFIG']['ROOMS'],
));
diff --git a/player.php b/player.php
index 2c78eab..6afdb5f 100644
--- a/player.php
+++ b/player.php
@@ -1,2 +1,51 @@
-player
-<? print_r($_GET) ?>
+<?php
+
+require_once('lib/PhpTemplate.php');
+require_once('lib/helper.php');
+require_once('config.php');
+
+$room = $_GET['room'];
+$language = $_GET['language'];
+$format = $_GET['format'];
+
+switch($format) {
+ case 'audio':
+ $type = 'audio';
+ break;
+
+ case 'slides':
+ $type = 'slides';
+ break;
+
+ case 'hq':
+ $type = 'video';
+ $width = 1920;
+ $height = 1080;
+ break;
+
+ case 'hd':
+ $type = 'video';
+ $width = 1024;
+ $height = 576;
+ break;
+
+ case 'ld':
+ $type = 'video';
+ $width = 640;
+ $height = 360;
+ break;
+}
+
+$tpl = new PhpTemplate('template/page.phtml');
+echo $tpl->render(array(
+ 'page' => $type,
+ 'baseurl' => baseurl(),
+ 'title' => 'Rooms',
+
+ 'room' => $room,
+ 'roomname' => $GLOBALS['CONFIG']['ROOMS'][$room],
+
+ 'type' => $type,
+ 'width' => @$width,
+ 'height' => @$height,
+));