Created
March 8, 2012 10:40
-
-
Save brianng/2000342 to your computer and use it in GitHub Desktop.
Minimal Vimeo Javascript API example
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
/* | |
* Play an embedded video and trigger a callback when finished playing (using jQuery). | |
* | |
* Vimeo JavaScript library | |
* http://vimeo.com/api/docs/player-js | |
* https://github.com/vimeo/player-api/tree/master/javascript | |
*/ | |
var vimeo = $f('vimeo'); // id of iframe or iframe element | |
vimeo.addEvent('ready', function() { | |
vimeo.api('play'); | |
vimeo.addEvent('finish', function() { | |
console.log('finished'); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment