ui: fix audioplayer time comp (#2636)
This commit is contained in:
parent
e95611c1a6
commit
e3f6a8fadc
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue