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.

This commit is contained in:
Arthur Hulsman 2018-03-07 15:17:30 +01:00
parent e90a603d57
commit 409b588458

View File

@ -206,7 +206,7 @@ class Ads {
// Add advertisement cue's within the time line if available // Add advertisement cue's within the time line if available
this.cuePoints.forEach(cuePoint => { this.cuePoints.forEach(cuePoint => {
if (cuePoint !== 0 && cuePoint !== -1) { if (cuePoint !== 0 && cuePoint !== -1 && cuePoint < this.player.duration) {
const seekElement = this.player.elements.progress; const seekElement = this.player.elements.progress;
if (seekElement) { if (seekElement) {