Created
June 24, 2011 21:56
-
-
Save brettgaylor/1045775 to your computer and use it in GitHub Desktop.
Popcorn with vimeo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script> | |
<script> | |
// ensure the web page (DOM) has loaded | |
document.addEventListener("DOMContentLoaded", function () { | |
// Create a popcorn instance by calling the Vimeo player plugin | |
var example = Popcorn.vimeo( | |
'#video', | |
'http://player.vimeo.com/video/25107077'); | |
// add a footnote at 2 seconds, and remove it at 6 seconds | |
example.footnote({ | |
start: 2, | |
end: 6, | |
text: "Pop!", | |
target: "footnotediv" | |
}); | |
// play the video right away | |
example.play(); | |
}, false); | |
</script> | |
</head> | |
<body> | |
<div id="video" style="width: 360px; height: 300px;" ></div> | |
<div id="footnotediv"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment