diff options
author | Sam Potts <me@sampotts.me> | 2018-01-30 09:22:14 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2018-01-30 09:22:14 +1100 |
commit | 71efbe7a927a9638204129ca7a2d52c498fa7e6e (patch) | |
tree | f0ed45d84bc0304a543bafa08216355e63e55ac8 /src/js/plyr.js | |
parent | afd695cb391535b508dc7a4301b6c2692ce2b607 (diff) | |
parent | 8f7a8940f36ab85c87a3406a378d383e58ee3d60 (diff) | |
download | plyr-71efbe7a927a9638204129ca7a2d52c498fa7e6e.tar.lz plyr-71efbe7a927a9638204129ca7a2d52c498fa7e6e.tar.xz plyr-71efbe7a927a9638204129ca7a2d52c498fa7e6e.zip |
Merge branch 'beta' into fix/ads-blocked
# Conflicts:
# dist/plyr.js
# dist/plyr.js.map
# src/js/plugins/ads.js
# src/js/plyr.js
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(); } /** |