Created
June 25, 2011 05:39
-
-
Save brettgaylor/1046203 to your computer and use it in GitHub Desktop.
Popcorn with Google Maps
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 web page (DOM) has loaded | |
document.addEventListener("DOMContentLoaded", function () { | |
// Create a popcorn instance by calling Popcorn("#id-of-my-video") | |
var pop = Popcorn("#ourvideo"); | |
// add a footnote at 2 seconds, and remove it at 6 seconds | |
pop.googlemap({ | |
start: 0, // seconds | |
end: 20, // seconds | |
type: "ROADMAP", | |
target: "mapdiv", | |
lat: 43.665429, | |
lng: -79.403323, | |
zoom: "10" | |
} ) | |
pop.googlemap({ | |
start: 0, // seconds | |
end: 30, // seconds | |
type: "ROADMAP", | |
target: "mapdiv", | |
location:"boston", | |
zoom: 15 | |
} ) | |
pop.googlemap({ | |
start: 0, // seconds | |
end: 20, // seconds | |
type: "STREETVIEW", | |
target: "map1", | |
lat: 43.665429, | |
lng: -79.403323, | |
zoom: "1", | |
heading: "0", | |
pitch: "1" | |
} ) | |
// play the video right away | |
pop.play(); | |
}, false); | |
</script> | |
</head> | |
<body> | |
<video height="180" width="300" id="ourvideo"> | |
<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