Skip to content

Instantly share code, notes, and snippets.

@zachinglis
Created June 18, 2009 21:03
Show Gist options
  • Save zachinglis/132187 to your computer and use it in GitHub Desktop.
Save zachinglis/132187 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Livestream API for web developers - example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
flashvars = { channel: 'mogulusbackstage' };
params = { AllowScriptAccess: 'always' };
swfobject.embedSWF("http://cdn.livestream.com/chromelessPlayer/wrappers/JSPlayer.swf",
"livestreamPlayer", "400", "300", "9.0.0", "expressInstall.swf", flashvars, params);
function init() {
player = document.getElementById('livestreamPlayer');
}
</script>
</head>
<body onload="init()">
<div id="livestreamPlayer">
<h1>This page requires flash</h1>
<p><a href="http://www.adobe.com/go/getflashplayer">download flash</a></p>
</div>
<br/>
<input type="button" value="play" onclick="player.connect('mogulusbackstage')"/>
<input type="button" value="pause" onclick="player.disconnect()"/>
<input type="button" value="vol +" onclick="player.volumeUp()"/>
<input type="button" value="vol -" onclick="player.volumeDown()"/>
<input type="text" id="channel_input" />
<input type="button" value="switch"
onclick="player.switchChannel(document.getElementById('channel_input').value)"/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment