/** * PosterImage - Video poster with fallback handling */ import { Icons } from '@/components/ui/Icon'; interface PosterImageProps { poster?: string; title: string; progress: number; } export function PosterImage({ poster, title, progress }: PosterImageProps) { return (
{poster ? ( {title} { const target = e.currentTarget as HTMLImageElement; target.style.display = 'none'; const parent = target.parentElement; if (parent) { const fallback = document.createElement('div'); fallback.className = 'w-full h-full flex items-center justify-center'; fallback.innerHTML = ''; parent.appendChild(fallback); } }} /> ) : (
)} {/* Progress overlay */}
); }