diff options
author | Sam Potts <sam@potts.es> | 2019-02-01 00:24:48 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2019-02-01 00:24:48 +1100 |
commit | eb628c8e4f109bb6aa4dc9196ee8f075092b225e (patch) | |
tree | 36c71f639a06c0c96d2bc9655d6c162ca03a3fca /src/js/plyr.js | |
parent | d0e3c7c6d00d66ea2dc8533e68aa0af0ca952d1d (diff) | |
download | plyr-eb628c8e4f109bb6aa4dc9196ee8f075092b225e.tar.lz plyr-eb628c8e4f109bb6aa4dc9196ee8f075092b225e.tar.xz plyr-eb628c8e4f109bb6aa4dc9196ee8f075092b225e.zip |
Ads bug fixes
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 927eb33d..26a1ae3b 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr -// plyr.js v3.4.8 +// plyr.js v3.5.0-beta.3 // https://github.com/sampotts/plyr // License: The MIT License (MIT) // ========================================================================== @@ -353,6 +353,11 @@ class Plyr { return null; } + // Intecept play with ads + if (this.ads && this.ads.enabled) { + this.ads.managerPromise.then(() => this.ads.play()).catch(() => this.media.play()); + } + // Return the promise (for HTML5) return this.media.play(); } |