Skip to content

Commit 2353f7f

Browse files
committed
fix: currentTimeDisplay shows 0:00 after seek
Steps to reproduce originally posted by @johanberonius at videojs#8988 (comment) - Pause player - Click progress bar and hold mouse button down - Current time display is updated correctly - Release mouse button - Current time display is reset to zero - Play video - Current time display is updated again This patch integrates the proposed workaround by @johanberonius, except for mobile browsers. The issue was not caused by adding the option `disableSeekWhileScrubbingOnMobile` per se, but is a side-effect of the improvements added in 77c99d2. Caveats: - On mobiles 0:00 is still visible for an instant on seek before it snaps to current time. This can be prevented by setting `enableSmoothSeeking`. - It's possible that the conditional has yet to be tweaked for SVT.
1 parent 20f8d76 commit 2353f7f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/js/control-bar/progress-control/seek-bar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class SeekBar extends Slider {
5757

5858
this.shouldDisableSeekWhileScrubbing_ = shouldDisableSeekWhileScrubbing;
5959
this.pendingSeekTime_ = null;
60+
if (!IS_IOS && !IS_ANDROID) {
61+
this.pendingSeekTime = this.getCurrentTime_;
62+
}
6063

6164
this.setEventHandlers_();
6265
}

0 commit comments

Comments
 (0)