Skip to content

Instantly share code, notes, and snippets.

@m-gagne
Created March 9, 2012 15:43
Show Gist options
  • Save m-gagne/2007137 to your computer and use it in GitHub Desktop.
Save m-gagne/2007137 to your computer and use it in GitHub Desktop.
Improper use of YouTube iFrame API
player = new YT.Player( 'introVideo', {
height: '270',
width: '480',
videoId: 'YyCMNdpF6uQ',
playerVars: {
rel: 0,
showinfo: 0
}
});
// this works:
player.getDuration();
// this does not work:
player2 = new YT.Player( 'introVideo' );
player2.getDuration();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment