From 91a4b86860f8db72dba0cec0c8cb18b93e423d85 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Sun, 6 May 2018 01:03:38 +1000 Subject: Small bug fixes --- src/js/plugins/ads.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/js/plugins') 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 */ -- cgit v1.2.3