Skip to content

Instantly share code, notes, and snippets.

@phivk
Created December 3, 2012 00:56
Show Gist options
  • Save phivk/4191931 to your computer and use it in GitHub Desktop.
Save phivk/4191931 to your computer and use it in GitHub Desktop.
demo of using several popcorn.js plugins on a vimeo video
<!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 pop = Popcorn.vimeo(
'#video',
'https://vimeo.com/27244727',
{pauseOnLinkClicked: true}
);
pop.flickr({
start: 1,
end: 3,
tags: "rodeo",
target: "flickrdiv"
});
pop.flickr({
start: 3,
end: 5,
tags: "football",
target: "flickrdiv"
});
pop.flickr({
start: 5,
end: 8,
tags: "pasta",
target: "flickrdiv"
});
pop.flickr({
start: 15,
end: 18,
tags: "wine",
target: "flickrdiv"
});
pop.flickr({
start: 20,
end: 23,
tags: "dance",
target: "flickrdiv"
});
pop.twitter({
start: 2,
end: 50,
title: "Learn",
src: "#learn",
target: "twitterdiv",
});
// play the video
pop.play()
}, false);
</script>
</head>
<body>
<div id="video" style="width: 500px; height: 281px;" ></div>
<div id="flickrdiv"></div>
<div id="twitterdiv"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment