import { baseURL } from "../api/axiosInstance";
import { usePlayer } from "../context/playerContext";
const MiniPlayer = () => {
const { currentSong, isMinimized, stop, toggleMinimize } = usePlayer();
if (!currentSong) return null;
return (
<>
{/* Fullscreen overlay - only visible when not minimized */}
{/* Header bar */}

{
(e.target as HTMLImageElement).src = "/favicon.png";
}}
/>
{currentSong.title}
{currentSong.artist}
{/* Minimize */}
{/* Close */}
{/* Video container - visible only in fullscreen */}
{/* Single iframe - always mounted to preserve playback state */}
{/* Minimized bar - always visible at bottom */}
{/* Song info */}

{
(e.target as HTMLImageElement).src = "/favicon.png";
}}
/>
{currentSong.title}
{currentSong.artist}
{/* Now playing indicator */}
{/* Controls */}
{/* Expand - shows fullscreen to allow seeking */}
{/* Close */}
>
);
};
export default MiniPlayer;