aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index dbc26fff..613cd0d2 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -309,11 +309,14 @@ class Plyr {
* Play the media, or play the advertisement
*/
play() {
+ // Play the ad if setup
+ // TODO: Fix the occasional play of the video before the Ad fires?
if (this.ads.enabled && !this.ads.initialized) {
this.ads.play();
}
- this.media.play();
+ // Return the promise (for HTML5)
+ return this.media.play();
}
/**