diff --git a/app/components/AudioPlayer.tsx b/app/components/AudioPlayer.tsx index 85019ac..7b98359 100644 --- a/app/components/AudioPlayer.tsx +++ b/app/components/AudioPlayer.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'; import Image from 'next/image'; import { useAudioPlayer } from '@/app/components/AudioPlayerContext'; -import { FaPlay, FaPause, FaVolumeHigh, FaForward, FaBackward, FaExpand, FaCompress, FaVolumeXmark } from "react-icons/fa6"; +import { FaPlay, FaPause, FaVolumeHigh, FaForward, FaBackward, FaCompress, FaVolumeXmark } from "react-icons/fa6"; import ColorThief from '@neutrixs/colorthief'; import { Progress } from '@/components/ui/progress'; import { useToast } from '@/hooks/use-toast'; @@ -15,7 +15,6 @@ export const AudioPlayer: React.FC = () => { const [showVolumeSlider, setShowVolumeSlider] = useState(false); const [volume, setVolume] = useState(1); const [isClient, setIsClient] = useState(false); - const [isExpanded, setIsExpanded] = useState(false); const [isMinimized, setIsMinimized] = useState(false); const audioCurrent = audioRef.current; const { toast } = useToast(); @@ -160,21 +159,29 @@ export const AudioPlayer: React.FC = () => { // Mini player (collapsed state) if (isMinimized) { return ( -
+
setIsMinimized(false)} > -
+
{currentTrack.name} +
+
+

+ {currentTrack.name} +

+
+

{currentTrack.artist}

+
- -
-
- - {/* Control buttons */} -
- - - -
- - {/* Progress bar */} -
- - {formatTime(audioCurrent?.currentTime ?? 0)} - - - - {formatTime(audioCurrent?.duration ?? 0)} - -
-
-
- ); - } - - // Full expanded player return ( -
-
-
-

Now Playing

-
+
+
+
+
+ {currentTrack.name} +
+

{currentTrack.name}

+

{currentTrack.artist}

+
+
+ {/* Control buttons */} +
+ + + +
+
- -
- {currentTrack.name} -
-

{currentTrack.name}

-

{currentTrack.artist}

-

{currentTrack.album}

-
-
- - {/* Control buttons */} -
- - - -
- - {/* Progress bar */} -
- - {formatTime(audioCurrent?.currentTime ?? 0)} - - - - {formatTime(audioCurrent?.duration ?? 0)} - -
- - {/* Volume control */} -
- - {showVolumeSlider && ( - - )} -
- -
+
); -}; \ No newline at end of file +}; + + +// {/* Progress bar */} +//
+// +// {formatTime(audioCurrent?.currentTime ?? 0)} +// +// +// +// {formatTime(audioCurrent?.duration ?? 0)} +// +//
\ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 3047ca7..a8014d3 100644 --- a/app/globals.css +++ b/app/globals.css @@ -11,6 +11,19 @@ body { .text-balance { text-wrap: balance; } + + .animate-scroll { + animation: scroll 8s linear infinite; + } +} + +@keyframes scroll { + 0%, 20% { + transform: translateX(0); + } + 80%, 100% { + transform: translateX(-100%); + } } @layer base {