diff options
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 3cbbed4b..52fe378e 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr -// plyr.js v3.0.0-beta.5 +// plyr.js v3.0.0-beta.8 // https://github.com/sampotts/plyr // License: The MIT License (MIT) // ========================================================================== @@ -309,12 +309,14 @@ class Plyr { * Play the media, or play the advertisement (if they are not blocked) */ play() { + // TODO: Always return a promise? if (this.ads.enabled && !this.ads.initialized && !this.ads.blocked) { this.ads.play(); - return; + return null; } - this.media.play(); + // Return the promise (for HTML5) + return this.media.play(); } /** |