diff options
author | Sam Potts <sam@potts.es> | 2018-05-06 01:03:38 +1000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-05-06 01:03:38 +1000 |
commit | 91a4b86860f8db72dba0cec0c8cb18b93e423d85 (patch) | |
tree | 8590992ec393c277dc4e92e85e987d4b3bbddb02 /src/js/plugins | |
parent | 5aece6fa06d767b8a9be65399cbb53354535bca4 (diff) | |
download | plyr-91a4b86860f8db72dba0cec0c8cb18b93e423d85.tar.lz plyr-91a4b86860f8db72dba0cec0c8cb18b93e423d85.tar.xz plyr-91a4b86860f8db72dba0cec0c8cb18b93e423d85.zip |
Small bug fixes
Diffstat (limited to 'src/js/plugins')
-rw-r--r-- | src/js/plugins/ads.js | 5 |
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 */ |