Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (32 sloc) 1.135 kb
<html>
<head>
<script type="text/javascript" src="src/require.js"></script>
</head>
<body>
<button id="toggle">Toggle Play/Pause</button>
<div id="player"></div>
<script type="text/javascript">
require({baseUrl: "src"}, ["player/player"], function(p) {
// the player constructor
var Player = p.Player
// the url to play
var url = "swf/example1.swf"
// the container element to use
var container = document.getElementById("player")
// create the player
var player = new Player()
// play the swf
player.run(url, container)
// toggle the player playing
document.getElementById('toggle').addEventListener('click', function(e) {
if (player.playing) {
player.pause()
}
else {
player.play()
}
})
})
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.