From ed4800de6ebac6e06313de7a3c190b5da83851f8 Mon Sep 17 00:00:00 2001 From: codytseng Date: Wed, 30 Jul 2025 22:23:43 +0800 Subject: [PATCH] feat: display remaining time instead of total duration in AudioPlayer --- src/components/AudioPlayer/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/AudioPlayer/index.tsx b/src/components/AudioPlayer/index.tsx index 16ff9a8a..08a9ae01 100644 --- a/src/components/AudioPlayer/index.tsx +++ b/src/components/AudioPlayer/index.tsx @@ -98,7 +98,9 @@ export default function AudioPlayer({ src, className }: AudioPlayerProps) { -
{formatTime(duration)}
+
+ {formatTime(Math.max(duration - currentTime, 0))} +
) }