Made sure play() returns a promise.
This commit is contained in:
parent
69ffcbad27
commit
ba8d7831a7
@ -311,10 +311,10 @@ class Plyr {
|
||||
play() {
|
||||
// Return the promise (for HTML5)
|
||||
if (this.ads.enabled && !this.ads.initialized) {
|
||||
this.ads.managerPromise.then(() => {
|
||||
return this.ads.managerPromise.then(() => {
|
||||
this.ads.play();
|
||||
}).catch(() => {
|
||||
return this.media.play();
|
||||
this.media.play();
|
||||
});
|
||||
} else {
|
||||
return this.media.play();
|
||||
|
Loading…
x
Reference in New Issue
Block a user