Skip to content

Commit

Permalink
Merge pull request streamaserver#1057 from Nargren/next-up-short-videos
Browse files Browse the repository at this point in the history
Adjust Up Next timer on videos as function of duration
  • Loading branch information
dularion authored Apr 8, 2021
2 parents 065428f + 6f9a268 commit fcac845
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ angular.module('streama').directive('streamaVideoPlayer', [
$scope.isNextVideoShowing = (nextVideoId && video.currentTime > videoOutroStart);
} else {
var remainingDurationSeconds = video.duration - video.currentTime;
$scope.isNextVideoShowing = (nextVideoId && remainingDurationSeconds < END_OF_VIDEO);
var endOfVideo = Math.min(Math.max(3, video.duration * 0.042), END_OF_VIDEO);
$scope.isNextVideoShowing = (nextVideoId && remainingDurationSeconds < endOfVideo);
}
}

Expand Down

0 comments on commit fcac845

Please sign in to comment.