From 1cef48d4f861c747573f12803f7f33bd4cf9c542 Mon Sep 17 00:00:00 2001 From: ferdiemmen Date: Mon, 15 Jan 2018 23:30:54 +0100 Subject: fix blocking play() if ads are set --- src/js/plyr.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/js/plyr.js') diff --git a/src/js/plyr.js b/src/js/plyr.js index d0fecc82..3c98dc26 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -309,6 +309,11 @@ class Plyr { * Play the media */ play() { + if (this.ads) { + this.ads.playAds(); + return this; + } + return this.media.play(); } -- cgit v1.2.3