From 79f4a66a353abe02eb4cf7ce5d47d72bd0daf450 Mon Sep 17 00:00:00 2001 From: angel Date: Wed, 2 Jul 2025 01:08:27 +0000 Subject: [PATCH] feat: enhance AudioPlayer component with improved layout, control button sizes, and added progress bar functionality --- app/components/AudioPlayer.tsx | 94 ++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/app/components/AudioPlayer.tsx b/app/components/AudioPlayer.tsx index 98d0065..cdec276 100644 --- a/app/components/AudioPlayer.tsx +++ b/app/components/AudioPlayer.tsx @@ -413,39 +413,45 @@ export const AudioPlayer: React.FC = () => { // Compact floating player (default state) return (
-
-
+
+
+ {/* Track info */}
{currentTrack.name}
-

{currentTrack.name}

-

{currentTrack.artist}

+

{currentTrack.name}

+

{currentTrack.artist}

- {/* Control buttons */} -
- - - - + {/* Center section with controls and progress */} +
+ {/* Control buttons */} +
+ + + + +
+ + {/* Progress bar */} +
+ + {formatTime(audioCurrent?.currentTime ?? 0)} + + + + {formatTime(audioCurrent?.duration ?? 0)} + +
+
- -
-
+ {/* Right side buttons */} +
@@ -488,16 +506,4 @@ export const AudioPlayer: React.FC = () => { />
); -}; - - -// {/* Progress bar */} -//
-// -// {formatTime(audioCurrent?.currentTime ?? 0)} -// -// -// -// {formatTime(audioCurrent?.duration ?? 0)} -// -//
\ No newline at end of file +}; \ No newline at end of file