From 424718b05aaa480f3bcfac274b335613d2e09ec1 Mon Sep 17 00:00:00 2001 From: Tim Hobbs Date: Sun, 6 Apr 2014 12:38:31 -0700 Subject: [PATCH] Video stops if paused 5 minutes Per trello card --- dashboard-ui/scripts/mediaplayer-video.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 50d5d41407..dce49d2c18 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -921,6 +921,11 @@ $("#pause", videoElement).hide().removeClass("fadeOut"); }, 300); + // Pause stop timer + this.pauseStop = setTimeout(function () { + self.stop(); + }, 5 * 60 * 1000); // 5 minutes + }).on("playing", function (e) { $('#video-playButton', videoControls).hide(); @@ -930,6 +935,10 @@ $("#play", videoElement).hide().removeClass("fadeOut"); }, 300); + // Remove pause setop timer + window.clearTimeout(this.pauseStop); + delete this.pauseStop; + }).on("timeupdate", function () { if (!self.isPositionSliderActive) {