Skip to content

Instantly share code, notes, and snippets.

@davidbanham
Created January 30, 2012 06:03
Show Gist options
  • Save davidbanham/1702844 to your computer and use it in GitHub Desktop.
Save davidbanham/1702844 to your computer and use it in GitHub Desktop.
Piece of VideoJS behaving strangely
// Adjust for jQuery ID syntax
if (id.indexOf("#") === 0) {
id = id.slice(1);
}
// If a player instance has already been created for this ID return it.
console.log(_V_.players); // Object that appears to have one property Class named example_video_1
console.log(id); // example_video_1
console.log(_V_.players[id]); // undefined
if (_V_.players[id]) {
console.log('This never fires'); // Does what it says on the tin
return _V_.players[id];
// Otherwise get element for ID
} else {
tag = _V_.el(id)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment