Last active
August 29, 2015 14:21
-
-
Save stuwilli/ebeed4199105fd2dedf4 to your computer and use it in GitHub Desktop.
Has Brightcove Ad Enabled Player
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
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