build video support
This commit is contained in:
@@ -45,8 +45,14 @@ export function MemeCard({ meme, onOpen, onShare }: Props) {
|
||||
return (
|
||||
<div
|
||||
className="relative group break-inside-avoid mb-3 rounded-xl overflow-hidden bg-zinc-900 cursor-pointer shadow-lg hover:shadow-accent/20 hover:shadow-xl transition-shadow duration-300"
|
||||
onMouseEnter={() => setHovered(true)}
|
||||
onMouseLeave={() => setHovered(false)}
|
||||
onMouseEnter={() => {
|
||||
setHovered(true);
|
||||
if (videoRef.current) videoRef.current.muted = false;
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
setHovered(false);
|
||||
if (videoRef.current) videoRef.current.muted = true;
|
||||
}}
|
||||
onClick={() => onOpen(meme)}
|
||||
>
|
||||
{/* Skeleton while loading */}
|
||||
|
||||
@@ -157,7 +157,6 @@ export function MemeDetail({ memeId, onClose }: Props) {
|
||||
controls
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="max-w-full max-h-full rounded-lg animate-fade-in"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user