From e3f6a8fadc38a16164af5c12a93c15382d4f1b69 Mon Sep 17 00:00:00 2001 From: Delirium Date: Mon, 7 Oct 2024 16:43:00 +0200 Subject: [PATCH] ui: fix audioplayer time comp (#2636) --- .../app/components/Session/Player/ReplayPlayer/AudioPlayer.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/app/components/Session/Player/ReplayPlayer/AudioPlayer.tsx b/frontend/app/components/Session/Player/ReplayPlayer/AudioPlayer.tsx index e93699fa2..ed79c433b 100644 --- a/frontend/app/components/Session/Player/ReplayPlayer/AudioPlayer.tsx +++ b/frontend/app/components/Session/Player/ReplayPlayer/AudioPlayer.tsx @@ -102,9 +102,11 @@ function DropdownAudioPlayer({ const file = files.find((f) => f.url === key); if (file) { const targetTime = (timeMs + delta * 1000 - file.start) / 1000; + console.log(targetTime, audio.currentTime, timeMs) const fileLength = fileLengths.current[key]; if (targetTime < 0 || (fileLength && targetTime > fileLength)) { audio.pause(); + audio.currentTime = 0; return; } else { audio.currentTime = targetTime;