From 409b588458fd598a88d56f3922da83ff82d80f5f Mon Sep 17 00:00:00 2001 From: Arthur Hulsman Date: Wed, 7 Mar 2018 15:17:30 +0100 Subject: [PATCH] Made sure that cue points for midrolls are not displayed when the ad rule for a midroll doesn't exceed the total play time of a video. --- src/js/plugins/ads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/plugins/ads.js b/src/js/plugins/ads.js index 9318e01d..0497c42c 100644 --- a/src/js/plugins/ads.js +++ b/src/js/plugins/ads.js @@ -206,7 +206,7 @@ class Ads { // Add advertisement cue's within the time line if available this.cuePoints.forEach(cuePoint => { - if (cuePoint !== 0 && cuePoint !== -1) { + if (cuePoint !== 0 && cuePoint !== -1 && cuePoint < this.player.duration) { const seekElement = this.player.elements.progress; if (seekElement) {