Created
June 2, 2011 21:52
-
-
Save rwaldron/1005414 to your computer and use it in GitHub Desktop.
A smallish Popcorn.js example. Check it live: http://jsfiddle.net/rwaldron/m94Tn/
This file contains hidden or 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 DOM has loaded | |
document.addEventListener("DOMContentLoaded", function () { | |
// Create a popcporn instance by calling Popcorn("#id-of-my-video") | |
var pop = Popcorn("#video"); | |
// play the video right away | |
pop.play() | |
// add a footnote at 2 seconds | |
.footnote({ | |
start: 2, | |
end: 6, | |
text: "This footnote is the stepping stone of progress!", | |
target: "footnotediv" | |
}); | |
}, false); | |
</script> | |
</head> | |
<body> | |
<video height="180" width="300" id="video" controls> | |
<source src="http://videos.mozilla.org/serv/webmademovies/popcornplug.mp4"></source> | |
<source src="http://videos.mozilla.org/serv/webmademovies/popcornplug.ogv"></source> | |
<source src="http://videos.mozilla.org/serv/webmademovies/popcornplug.webm"></source> | |
</video> | |
<div id="footnotediv"> </div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment