From 4d0730f3943eac76353192d7b5b6b371a18abb73 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Mon, 7 Oct 2024 16:41:23 +0200 Subject: [PATCH] ui: fix audioplayer time comp --- .../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;