diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-02-26 23:35:36 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-02-26 23:35:36 +0100 |
commit | 0e9bbbf754bf8c2ee0f2a37b9a05fecd884bb42e (patch) | |
tree | dd5e2ed16e95c05919ccbf7389a14865af0ea674 /contrib/www/lac | |
parent | added stream-site nginx (diff) |
new www stuff
Diffstat (limited to 'contrib/www/lac')
-rw-r--r-- | contrib/www/lac/browser.php | 45 | ||||
-rw-r--r-- | contrib/www/lac/embed-test.html | 14 | ||||
-rw-r--r-- | contrib/www/lac/embed.php | 21 | ||||
-rw-r--r-- | contrib/www/lac/index.php | 13 | ||||
-rw-r--r-- | contrib/www/lac/init.php | 67 | ||||
-rw-r--r-- | contrib/www/lac/player.php | 131 | ||||
-rw-r--r-- | contrib/www/lac/style.css | 50 |
7 files changed, 0 insertions, 341 deletions
diff --git a/contrib/www/lac/browser.php b/contrib/www/lac/browser.php deleted file mode 100644 index 5df08dc..0000000 --- a/contrib/www/lac/browser.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -$browser = array( - 'platform' => 'unknown', - 'name' => 'unknown', - 'version' => '0.0.0', - 'majorver' => 0, - 'minorver' => 0, - 'build' => 0, - 'useragent' => '' -); - -$browsers = array( - 'firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', - 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol' -); - -if (isset($_SERVER['HTTP_USER_AGENT'])) { - $browser['useragent'] = $_SERVER['HTTP_USER_AGENT']; - $user_agent = strtolower($browser['useragent']); - foreach($browsers as $_browser) { - if (preg_match("/($_browser)[\/ ]?([0-9.]*)/", $user_agent, $match)) { - $browser['name'] = $match[1]; - $browser['version'] = $match[2]; - @list($browser['majorver'], $browser['minorver'], $browser['build']) = explode('.', $browser['version']); - break; - } - } - if (preg_match('/linux/i', $user_agent)) { - $browser['platform'] = 'linux'; - } - elseif (preg_match('/macintosh|mac os x/i', $user_agent)) { - $browser['platform'] = 'mac'; - } - elseif (preg_match('/windows|win32/i', $user_agent)) { - $browser['platform'] = 'windows'; - } - -} - -if ( isset($_GET['debug']) ) { - echo "<pre>"; - print_r($browser); - echo "</pre>"; -} -?> diff --git a/contrib/www/lac/embed-test.html b/contrib/www/lac/embed-test.html deleted file mode 100644 index 12e68b3..0000000 --- a/contrib/www/lac/embed-test.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Linux Audio Conference 2013 - Live Stream</title> - <link rel="stylesheet" type="text/css" href="style.css"> -</head> -<body> - <h1>Linux Audio Conference 2013 - Live Stream (embedded)</h1> - <center> - <iframe src="embed.php" width="874px" height="600px" frameborder=0 padding=0 margin=0> - </iframe> - </center> -</body> -</html> diff --git a/contrib/www/lac/embed.php b/contrib/www/lac/embed.php deleted file mode 100644 index 8227f5d..0000000 --- a/contrib/www/lac/embed.php +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Linux Audio Conference 2013 - Live Stream</title> - <link rel="stylesheet" type="text/css" href="style.css"> - <style> - body { - margin: 0; - padding: 0; - }; - </style> -</head> -<body> - <center> -<?php -$EMBED=1; -require_once('player.php'); -?> - </center> -</body> -</html> diff --git a/contrib/www/lac/index.php b/contrib/www/lac/index.php deleted file mode 100644 index a246782..0000000 --- a/contrib/www/lac/index.php +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Linux Audio Conference 2013 - Live Stream</title> - <link rel="stylesheet" type="text/css" href="style.css"> -</head> -<body> - <h1>Linux Audio Conference 2013 - Live Stream</h1> - <center> -<?php require_once('player.php'); ?> - </center> -</body> -</html> diff --git a/contrib/www/lac/init.php b/contrib/www/lac/init.php deleted file mode 100644 index 9d3d779..0000000 --- a/contrib/www/lac/init.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -require_once('browser.php'); - -$DEFAULT_MODE = 'flash'; -if (($browser['name'] == 'firefox' && $browser['majorver'] >= 4) || - ($browser['name'] == 'opera' && $browser['majorver'] == 10 && $browser['minorver'] >= 60) || - ($browser['name'] == 'opera' && $browser['majorver'] >= 11) || - ($browser['name'] == 'chrome' && $browser['majorver'] >= 6) || - ($browser['name'] == 'safari' && $browser['platform'] == 'mac')) { - $DEFAULT_MODE = 'html5'; -} - -if ( isset($EMBED) && $EMBED >= 3 ) { - $DEFAULT_PROFILE = 'mini'; -} elseif ( isset($EMBED) && $EMBED >= 2 ) { - $DEFAULT_PROFILE = 'low'; -} else { - $DEFAULT_PROFILE = 'medium'; -} - -$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 'mini': { $WIDTH = 426; $HEIGHT = 240; break; } - default: { $PROFILE = 'medium'; $WIDTH = 854; $HEIGHT = 480; break; } -} - -$SRC = isset($_GET['src']) ? $_GET['src'] : 'av'; - -$MODE = isset($_GET['mode']) ? $_GET['mode'] : $DEFAULT_MODE; -switch($MODE) { - case 'flash': { break; } - default: { $MODE = 'html5'; break; } -} - -$URL_BASE = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; -$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"; - -if ( isset($EMBED) ) { - $URL_HIGH = $URL_BASE_IDX . "?mode=$MODE&src=$SRC&profile=high"; -} else { - $URL_HIGH = $URL_BASE . "?mode=$MODE&src=$SRC&profile=high"; -} -if ( isset($EMBED) && $EMBED >= 2 ) { - $URL_MEDIUM = $URL_BASE_IDX . "?mode=$MODE&src=$SRC&profile=medium"; -} else { - $URL_MEDIUM = $URL_BASE . "?mode=$MODE&src=$SRC&profile=medium"; -} -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_MINI = $URL_BASE . "?mode=$MODE&src=$SRC&profile=mini"; - - -$STREAM_URL_BASE = 'http://lac-live.spreadspace.org'; -$STREAM_URL_WEBM = "$STREAM_URL_BASE:8000/$SRC-webm-$PROFILE.webm"; -$STREAM_URL_HLS = "$STREAM_URL_BASE/lac-live/$SRC-hls-$PROFILE.m3u8"; -$STREAM_URL_FLASH = "$STREAM_URL_BASE:8000/$SRC-flash-$PROFILE.flv"; - -?> diff --git a/contrib/www/lac/player.php b/contrib/www/lac/player.php deleted file mode 100644 index 21e7030..0000000 --- a/contrib/www/lac/player.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php require_once('init.php'); ?> - <table id="header" width="<?php printf('%dpx', $WIDTH); ?>"> - <tr> - <td align='left' width='40%'> -<?php - switch($MODE) { - case 'html5': { - echo " <span class='selected'>HTML5</span>"; - echo " <span><a href='$URL_FLASH'>FLASH</a></span>"; - break; - } - case 'flash': { - echo " <span><a href='$URL_HTML5'>HTML5</a></span>"; - echo " <span class='selected'>FLASH</span>"; - break; - } - } -?> - </td> - <td align='right' width='60%'> -<?php - switch($PROFILE) { - case 'high': { - echo " <span class='selected'>high</span>"; - if ( isset($EMBED) && $EMBED >= 2 ) { - echo " <span><a href='$URL_MEDIUM' target='_parent'>medium</a></span>"; - } else { - echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; - } - if ( isset($EMBED) && $EMBED >= 3 ) { - echo " <span><a href='$URL_LOW' target='_parent'>low</a></span>"; - } else { - echo " <span><a href='$URL_LOW'>low</a></span>"; - } - echo " <span><a href='$URL_MINI'>mini</a></span>"; - break; - } - case 'medium': { - if ( isset($EMBED) ) { - echo " <span><a href='$URL_HIGH' target='_parent'>high</a></span>"; - } else { - echo " <span><a href='$URL_HIGH'>high</a></span>"; - } - echo " <span class='selected'>medium</span>"; - if ( isset($EMBED) && $EMBED >= 3 ) { - echo " <span><a href='$URL_LOW' target='_parent'>low</a></span>"; - } else { - echo " <span><a href='$URL_LOW'>low</a></span>"; - } - echo " <span><a href='$URL_MINI'>mini</a></span>"; - break; - } - case 'low': { - if ( isset($EMBED) ) { - echo " <span><a href='$URL_HIGH' target='_parent'>high</a></span>"; - } else { - echo " <span><a href='$URL_HIGH'>high</a></span>"; - } - if ( isset($EMBED) && $EMBED >= 2 ) { - echo " <span><a href='$URL_MEDIUM' target='_parent'>medium</a></span>"; - } else { - echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; - } - echo " <span class='selected'>low</span>"; - echo " <span><a href='$URL_MINI'>mini</a></span>"; - break; - } - case 'mini': { - if ( isset($EMBED) ) { - echo " <span><a href='$URL_HIGH' target='_parent'>high</a></span>"; - } else { - echo " <span><a href='$URL_HIGH'>high</a></span>"; - } - if ( isset($EMBED) && $EMBED >= 2 ) { - echo " <span><a href='$URL_MEDIUM' target='_parent'>medium</a></span>"; - } else { - echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; - } - if ( isset($EMBED) && $EMBED >= 3 ) { - echo " <span><a href='$URL_LOW' target='_parent'>low</a></span>"; - } else { - echo " <span><a href='$URL_LOW'>low</a></span>"; - } - echo " <span class='selected'>mini</span>"; - break; - } - } -?> - </td> - </tr> - </table> -<?php if ($MODE == "flash") { ?> - <script type="text/javascript" src="/flowplayer/flowplayer-3.2.6.min.js"></script> - <div id="player" style="<?php printf('display:block;width:%dpx;height:%dpx', $WIDTH, $HEIGHT); ?>"></div> - <script>flowplayer("player", "/flowplayer/flowplayer-3.2.7.swf", { - clip: { - url: "<?php echo $STREAM_URL_FLASH; ?>", - autoPlay: true, - autoBuffering: true, - bufferLength: 5, - live: true, - scaling: "fit" - }, - plugins: { - controls: { - url: "/flowplayer/flowplayer.controls-3.2.5.swf", - time: false, - } - } - } ); - </script> -<?php } else { ?> - <video width=<?php echo $WIDTH; ?> height=<?php echo $HEIGHT; ?> autoplay controls> - <source src="<?php echo $STREAM_URL_WEBM; ?>" type="video/webm" /> - <source src="<?php echo $STREAM_URL_HLS; ?>" type="application/x-mpegURL" /> - </video> -<?php } ?> - <table id="footer" width="<?php printf('%dpx', $WIDTH); ?>"> - <tr> - <td align='right'> - <h2>Direct Link(s):</h2> - </td> - <td align='left'> -<?php if ($MODE == "flash") { - echo " <a href='$STREAM_URL_FLASH'>$STREAM_URL_FLASH</a>"; - } else { - echo " <a href='$STREAM_URL_WEBM'>$STREAM_URL_WEBM</a><br />"; - echo " <a href='$STREAM_URL_HLS'>$STREAM_URL_HLS</a>"; - } ?> - </td> - </table> diff --git a/contrib/www/lac/style.css b/contrib/www/lac/style.css deleted file mode 100644 index bc8919a..0000000 --- a/contrib/www/lac/style.css +++ /dev/null @@ -1,50 +0,0 @@ -body { - background-color: #FFFFFF; - font-family: "Lucida Grande","bitstream vera sans","trebuchet ms",verdana,arial; - text-align: center; -} - -h1 { - letter-spacing: -1px; - color: #2D5AC3; - font-weight: normal; - font-size: 1.7em; -} - -h2 { - letter-spacing: -1px; - font-weight: bold; - font-size: 1.2em; - text-align: left; -} - -table#header -{ - background-color: #333333; -} - -td { - padding: 0.5em 0.7em; -} - -td span { - color: #FFFFFF; -} - -td span a { - color: #AAAAAA; - font-size: 0.8em; - text-decoration: none; -} - -td span a:hover { - text-decoration: underline; -} - -td span.selected { - font-weight: bold; -} - -table#footer td { - padding: 0.3em 0.5em; -} |