"use client"; import { Disc3, Music, Play, SkipForward, Square, Volume2 } from "lucide-react"; import { useMediaPlayer } from "@/lib/hooks/use-media-player"; export function MiniPlayer() { const { playing, current, queue, volume, pending, skip, stop, setVolume } = useMediaPlayer(); // Nothing to show if no track is playing and nothing is queued if (!current && queue.length === 0) return null; return (
{current?.title ?? "Unknown track"}
{queue.length > 0 && ({queue.length > 1 ? `${queue.length} in queue` : "1 in queue"}
)}