Ads bug fixes

This commit is contained in:
Sam Potts
2019-02-01 00:24:48 +11:00
parent d0e3c7c6d0
commit eb628c8e4f
27 changed files with 406 additions and 296 deletions

View File

@ -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();
}