Skip to content

Instantly share code, notes, and snippets.

@TwP
Created January 29, 2010 03:51
Show Gist options
  • Save TwP/289429 to your computer and use it in GitHub Desktop.
Save TwP/289429 to your computer and use it in GitHub Desktop.
function good_to_go(video) {
video.on_event(function(time) {
$('#time-display').text(time);
});
// at this point in time, our callback function is registered and "prev"
// is null
video.seek(42);
// now we have set the video time - unless we happen to _exactly_ nail the
// current time of the vide, on_event will fire off the callbacks
//
// I know this works with the YouTube video
};
$('#player-id').video({
youtube: 'u5rLSyT_hVE',
ready: good_to_go
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment