From 6bceb98b8f3fa397fccb010718e3fffbb84e4991 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Sun, 1 Mar 2026 05:31:59 -0600 Subject: [PATCH] Vines: skeleton loading state, hide play button during autoplay, persistent poster overlay to prevent black flash --- src/pages/VinesFeedPage.tsx | 43 +++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/src/pages/VinesFeedPage.tsx b/src/pages/VinesFeedPage.tsx index 557558ba..01625840 100644 --- a/src/pages/VinesFeedPage.tsx +++ b/src/pages/VinesFeedPage.tsx @@ -318,6 +318,7 @@ function VineCard({ event, isActive, onCommentClick }: VineCardProps) { const [moreMenuOpen, setMoreMenuOpen] = useState(false); const [isPlaying, setIsPlaying] = useState(false); const [hasStarted, setHasStarted] = useState(false); + const [isAttemptingPlay, setIsAttemptingPlay] = useState(isActive); const [isMuted, setIsMuted] = useState(globalMuted); const videoRef = useRef(null); @@ -336,12 +337,15 @@ function VineCard({ event, isActive, onCommentClick }: VineCardProps) { video.currentTime = 0; video.muted = globalMuted; setIsMuted(globalMuted); + setIsAttemptingPlay(true); video.play().catch(() => { // Autoplay blocked — leave paused, user can tap + setIsAttemptingPlay(false); }); } else { video.pause(); video.currentTime = 0; + setIsAttemptingPlay(false); } }, [isActive, imeta.url]); @@ -374,20 +378,30 @@ function VineCard({ event, isActive, onCommentClick }: VineCardProps) {