From 6353bf37997692a268c8c02cb45f4abf46fdfd4a Mon Sep 17 00:00:00 2001 From: Jelle van Snik Date: Tue, 17 Jan 2023 19:11:10 +0100 Subject: [PATCH] fix time control once again --- src/components/video/controls/TimeControl.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/video/controls/TimeControl.tsx b/src/components/video/controls/TimeControl.tsx index 49e933cd..1adea300 100644 --- a/src/components/video/controls/TimeControl.tsx +++ b/src/components/video/controls/TimeControl.tsx @@ -11,13 +11,13 @@ function formatSeconds(secs: number, showHours = false): string { } let time = secs; - const seconds = time % 60; + const seconds = Math.floor(time % 60); - time = Math.floor(time / 60); - const minutes = time % 60; + time /= 60; + const minutes = Math.floor(time % 60); - time = Math.floor(time / 60); - const hours = time; + time /= 60; + const hours = Math.floor(time); const paddedSecs = seconds.toString().padStart(2, "0"); const paddedMins = minutes.toString().padStart(2, "0");