Created
June 29, 2011 23:33
-
-
Save brettgaylor/1055278 to your computer and use it in GitHub Desktop.
Popcorn Googlemap
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 the map command | |
pop.googlemap({ | |
start: 2, // Our start time in seconds | |
end: 6, // Our end time in seconds | |
type: "STREETVIEW", // | |
target: "googlemap", // The id of our target DoM element | |
location: "New York", // The location we want our map to display at | |
zoom: 1 // Setting the zoom that we would like | |
}); | |
// 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="googlemap"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment