Created
June 26, 2012 19:21
-
-
Save chrisallick/2998206 to your computer and use it in GitHub Desktop.
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
// taken from Best in Class | |
onYouTubePlayerReady = function( playerId ) { | |
ytplayer = document.getElementById( "myytplayer" ); | |
ytplayer.addEventListener("onStateChange", "onytplayerStateChange"); | |
ytplayer.playVideo(); | |
//t = setTimeout( transition, 500 ); | |
} | |
function onytplayerStateChange(newState) { | |
if( newState == 0 ) { | |
// just re-embed video if there is only one video in playlist. | |
playNextVideo(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment