From c7dc9442642bec37b0771c3433526a59072c6b1f Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Thu, 12 Mar 2026 12:52:30 +0300 Subject: [PATCH] show episode title & duration in player --- web/src/player/player.tsx | 107 ++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/web/src/player/player.tsx b/web/src/player/player.tsx index ef00104..68a1843 100644 --- a/web/src/player/player.tsx +++ b/web/src/player/player.tsx @@ -68,58 +68,65 @@ export const Player = () => { } return ( -
-
-
- {status === "playing" ? ( - - ) : ( - - )} - - -
-
{ - if (!audioRef.current) return; +
+
+
+
+
+ {status === "playing" ? ( + + ) : ( + + )} + + +
+
{ + if (!audioRef.current) return; - const rect = e.currentTarget.getBoundingClientRect(); - const left = e.clientX - rect.x; - const percent = Math.floor((left / rect.width) * 100); - const newTime = (duration * percent) / 100; - audioRef.current.currentTime = newTime; - setCurrentTime(newTime); - }} - > -
+ const rect = e.currentTarget.getBoundingClientRect(); + const left = e.clientX - rect.x; + const percent = Math.floor((left / rect.width) * 100); + const newTime = (duration * percent) / 100; + audioRef.current.currentTime = newTime; + setCurrentTime(newTime); + }} + > +
+
+

0 ? "min-w-[70px]" : "min-w-[50px]"} text-right`} + > + {formatTime(currentTime)} +

+
+ +

{episode?.title}

+

{formatTime(duration)}

-

0 ? "min-w-[70px]" : "min-w-[50px]"} text-right`} - > - {formatTime(currentTime)} -

);