From b447ec0c76dbbe99336559ae4efaed9ac50d5dab Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 13 Mar 2026 00:30:07 +0800 Subject: [PATCH] 1 --- components/BigVideoCard.tsx | 65 +++++++++++++++++++++++--------- components/NativeVideoPlayer.tsx | 22 ++++++----- utils/videoRows.ts | 16 ++++++-- 3 files changed, 72 insertions(+), 31 deletions(-) diff --git a/components/BigVideoCard.tsx b/components/BigVideoCard.tsx index a7aa6fe..1083859 100644 --- a/components/BigVideoCard.tsx +++ b/components/BigVideoCard.tsx @@ -37,6 +37,7 @@ export function BigVideoCard({ item, isVisible, onPress }: Props) { const [videoUrl, setVideoUrl] = useState(); const [isDash, setIsDash] = useState(false); const [paused, setPaused] = useState(true); + const [muted, setMuted] = useState(true); const thumbOpacity = useRef(new Animated.Value(1)).current; // Reset video state when the item changes @@ -44,6 +45,7 @@ export function BigVideoCard({ item, isVisible, onPress }: Props) { setVideoUrl(undefined); setIsDash(false); setPaused(true); + setMuted(true); thumbOpacity.setValue(1); }, [item.bvid]); @@ -88,6 +90,7 @@ export function BigVideoCard({ item, isVisible, onPress }: Props) { if (!videoUrl) return; setPaused(!isVisible); if (!isVisible) { + setMuted(true); // Restore thumbnail when leaving viewport Animated.timing(thumbOpacity, { toValue: 1, @@ -111,9 +114,28 @@ export function BigVideoCard({ item, isVisible, onPress }: Props) { {/* Media area */} - {/* Thumbnail */} + {/* Video player — rendered first so it sits behind the thumbnail */} + {videoUrl && ( + - {/* Video player — only mounted when URL is available */} - {videoUrl && ( -