Skip to content

Instantly share code, notes, and snippets.

@stuwilli
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuwilli/ebeed4199105fd2dedf4 to your computer and use it in GitHub Desktop.
Save stuwilli/ebeed4199105fd2dedf4 to your computer and use it in GitHub Desktop.
Has Brightcove Ad Enabled Player
function hasAdEnabledPlayer() {
if (typeof brightcove !== 'undefined') {
try {
for (var k in brightcove.experiences) {
console.log('checking player ' + k);
if (brightcove.api.getExperience(k).modules.hasOwnProperty('advertising')) {
return true;
} else if (brightcove.getExperience(k).modules.hasOwnProperty('advertising')) {
return true;
}
}
} catch (e) {}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment