Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

[t1147] added safety harness for youtube init #101

Closed
wants to merge 4 commits into from

Conversation

secretrobotron
Copy link
Contributor

No description provided.

// A global callback for youtube... that makes me angry
var onYouTubePlayerAPIReady = function() {
global.onYouTubePlayerAPIReady = function() {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things.

  1. I think this should be PopcornYT

  2. You need to declare this so we don't leak into global. Maybe do it up above where you declare oldYT

1. Added some documentation in code
2. Fixed up leaky globals
3. Adjusted older ready variables to not be on ready function
}
};

// Store a reference to the old youtubePlayerReady function if there was one
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this down with your if (global.YT) check below, since they are somewhat paired.

@rwaldron
Copy link
Contributor

Is this still valid?

@jbuck
Copy link
Member

jbuck commented Aug 22, 2012

Staged on master

@jbuck jbuck closed this Aug 22, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants