diff options
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 27019759..52fe378e 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -306,13 +306,13 @@ class Plyr { } /** - * Play the media, or play the advertisement + * Play the media, or play the advertisement (if they are not blocked) */ 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) { + // TODO: Always return a promise? + if (this.ads.enabled && !this.ads.initialized && !this.ads.blocked) { this.ads.play(); + return null; } // Return the promise (for HTML5) |