"use client"; import { useState } from "react"; /** * A message's video or audio, loaded only when clicked (WEBSITE-1.0-PLAN ยง7): a thumbnail first, * then youtube-nocookie or Spotify's player. Nothing loads from YouTube or Spotify until then. */ export function MessagePlayer({ title, embedUrl, thumbnail, url, source, className }: { title: string; embedUrl: string | null; thumbnail: string | null; url: string; source: "youtube" | "spotify"; className?: string }) { const [playing, setPlaying] = useState(false); const ratio = source === "spotify" ? "aspect-[16/7]" : "aspect-video"; if (playing && embedUrl) { return (