From df078b395de7873a82559840827b50bd6c36cf7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 11 Sep 2018 13:54:33 +0200 Subject: [PATCH] Video progress: skip 'only reporting when paused' when forcing report This ensures that the final pause at the end of a non-looping video is also reported. --- src/scripts/video_plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/video_plugins.js b/src/scripts/video_plugins.js index d19c1ed5..36762fc7 100644 --- a/src/scripts/video_plugins.js +++ b/src/scripts/video_plugins.js @@ -106,7 +106,7 @@ var VideoProgressPlugin = videojs.extend(Plugin, { inspect_progress: function(force_report) { // Don't report seeking when paused, only report actual playback. - if (this.player.paused()) return; + if (!force_report && this.player.paused()) return; let now_in_ms = new Date().getTime(); if (!force_report && now_in_ms - this.last_wallclock_time_ms < PROGRESS_RELAXING_TIME_MSEC) {