aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plugins/ads.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plugins/ads.js')
-rw-r--r--src/js/plugins/ads.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/plugins/ads.js b/src/js/plugins/ads.js
index 4a3deeaa..79c00ab3 100644
--- a/src/js/plugins/ads.js
+++ b/src/js/plugins/ads.js
@@ -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
*/