diff options
author | Christian Pointner <equinox@spreadspace.org> | 2012-10-26 15:03:40 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2012-10-26 15:03:40 +0200 |
commit | 50dbc53f8625d88908aded35222383ecd67b4dbf (patch) | |
tree | fa1d077d605e2ea664fb8481e0a84c5c284903da /contrib/www/2012/init.php | |
parent | runit create script with lower (diff) |
www has now lower as well
Diffstat (limited to 'contrib/www/2012/init.php')
-rw-r--r-- | contrib/www/2012/init.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/www/2012/init.php b/contrib/www/2012/init.php index 4afba69..e6f2318 100644 --- a/contrib/www/2012/init.php +++ b/contrib/www/2012/init.php @@ -11,7 +11,9 @@ if (($browser['name'] == 'firefox' && $browser['majorver'] >= 4) || $DEFAULT_MODE = 'html5'; } -if ( isset($EMBED) && $EMBED >= 2 ) { +if ( isset($EMBED) && $EMBED >= 3 ) { + $DEFAULT_PROFILE = 'lower'; +} elseif ( isset($EMBED) && $EMBED >= 2 ) { $DEFAULT_PROFILE = 'low'; } else { $DEFAULT_PROFILE = 'medium'; @@ -21,6 +23,7 @@ $PROFILE= isset($_GET['profile']) ? $_GET['profile'] : $DEFAULT_PROFILE; switch($PROFILE) { case 'high': { $WIDTH = 1280; $HEIGHT = 720; break; } case 'low': { $WIDTH = 640; $HEIGHT = 360; break; } + case 'lower': { $WIDTH = 426; $HEIGHT = 240; break; } default: { $PROFILE = 'medium'; $WIDTH = 854; $HEIGHT = 480; break; } } @@ -37,7 +40,7 @@ switch($MODE) { } $URL_BASE = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; -$URL_BASE_IDX = str_replace("embed.php", "index.php", $URL_BASE); +$URL_BASE_IDX = preg_replace("/embed(-.*)?\.php/", "index.php", $URL_BASE); $URL_FLASH = $URL_BASE . "?mode=flash&src=$SRC&profile=$PROFILE"; $URL_HTML5 = $URL_BASE . "?mode=html5&src=$SRC&profile=$PROFILE"; @@ -55,7 +58,12 @@ if ( isset($EMBED) && $EMBED >= 2 ) { } else { $URL_MEDIUM = $URL_BASE . "?mode=$MODE&src=$SRC&profile=medium"; } -$URL_LOW = $URL_BASE . "?mode=$MODE&src=$SRC&profile=low"; +if ( isset($EMBED) && $EMBED >= 3 ) { + $URL_LOW = $URL_BASE_IDX . "?mode=$MODE&src=$SRC&profile=low"; +} else { + $URL_LOW = $URL_BASE . "?mode=$MODE&src=$SRC&profile=low"; +} +$URL_LOWER = $URL_BASE . "?mode=$MODE&src=$SRC&profile=lower"; $STREAM_URL_BASE = 'http://elevate-live.spreadspace.org'; |