"use client"; import { Pause, Play, SkipForward, Volume2 } from "lucide-react"; import { motion } from "motion/react"; import { Button } from "@/components/primitives/button"; import { useMediaSkip, useMediaState, useMediaWsSync } from "@/hooks"; import { useMediaPlayer } from "@/lib/hooks/use-media-player"; import { cn } from "@/lib/utils"; import { useWebSocket } from "@/lib/ws/context"; export function MiniPlayer() { const ws = useWebSocket(); const { data: state } = useMediaState(); const { playing, current } = useMediaPlayer(); useMediaWsSync(ws); const skip = useMediaSkip(); if (!current) return null; return ( {current.title}
{current.title}
{current.source}
); }