Small bug fixes

This commit is contained in:
Sam Potts
2018-05-06 01:03:38 +10:00
parent 5aece6fa06
commit 91a4b86860
17 changed files with 105 additions and 68 deletions

View File

@ -18,7 +18,6 @@ class Ads {
constructor(player) {
this.player = player;
this.publisherId = player.config.ads.publisherId;
this.enabled = player.isHTML5 && player.isVideo && player.config.ads.enabled && utils.is.string(this.publisherId) && this.publisherId.length;
this.playing = false;
this.initialized = false;
this.elements = {
@ -44,6 +43,10 @@ class Ads {
this.load();
}
get enabled() {
return this.player.isHTML5 && this.player.isVideo && this.player.config.ads.enabled && utils.is.string(this.publisherId) && this.publisherId.length;
}
/**
* Load the IMA SDK
*/