Created
December 19, 2011 00:42
-
-
Save dmolsen/1494961 to your computer and use it in GitHub Desktop.
Initializing the YouTubePlayer object to listen to onStateChange events
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
var vidId = 'videoEmbed'; // the ID of the div holding the video | |
var vidYTId = 'XhLrlhFzAjA'; // the ID of the video from YouTube | |
var YTVideo = new YoutubePlayer(vidId, vidYTId,{ | |
width: 640, | |
height: 360, | |
objparams: { allowFullscreen: "true" }, | |
ytparams: { rel: 0, showsearch: 0, showinfo: 0, modestbranding: 1 } | |
}); | |
// objparams are the parameters that might get included in the old embed code (e.g. fullscreen) | |
// ytparams are the youtube player parameters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment