aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hulsman <a.hulsman@orangegames.com>2018-03-07 15:17:30 +0100
committerArthur Hulsman <a.hulsman@orangegames.com>2018-03-07 15:17:30 +0100
commit409b588458fd598a88d56f3922da83ff82d80f5f (patch)
treebac3a8d83f458529f7408134ffdccba7c619e624
parente90a603d57836f6b8962a661b4668fd81c9b72a4 (diff)
downloadplyr-409b588458fd598a88d56f3922da83ff82d80f5f.tar.lz
plyr-409b588458fd598a88d56f3922da83ff82d80f5f.tar.xz
plyr-409b588458fd598a88d56f3922da83ff82d80f5f.zip
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.
-rw-r--r--src/js/plugins/ads.js2
1 files changed, 1 insertions, 1 deletions
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) {