Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Created October 24, 2010 19:25
Show Gist options
  • Save badsyntax/643872 to your computer and use it in GitHub Desktop.
Save badsyntax/643872 to your computer and use it in GitHub Desktop.
var events = {
onReady: function(){}, // after player has been constructed and first video has been cued
onVideoPlay: function(){}, // when video starts to play
onVideoPaused: function(){}, // when video has paused
onBuffer: function(){}, // when video starts to buffer
onError: function(errorMsg){} , // when there was an error loading a video
onBeforePlaylistLoaded: function(){}, // before the playlist has started loading (ajax event)
onAfterPlaylistLoaded: function(){}, // after the playlist has finished loading (ajax event) (will execute on error)
onVideoLoad: function(videoID){}, // when a video is loaded into the player, regardless if successful or not
onVideoCue: function(videoID){}, // after a video has been cued
onYoutubeStateChange: function(stateID){} // youtube event handler event
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment