From c5288cbed42e778787c5da0e1bc617b9c5a641f0 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Sun, 19 Jan 2025 17:54:14 -0600 Subject: [PATCH] trash --- src/screens/VideoFeed/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 82bce9df07..921166de55 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -546,6 +546,13 @@ function VideoItemInner({ }) { const {bottom} = useSafeAreaInsets() const {status} = useEvent(player, 'statusChange', {status: player.status}) + const [ready, setReady] = useState(false) + const readyToPlay = status === 'readyToPlay' + const canPlay = active && readyToPlay + + if (canPlay && !ready) { + setTimeout(() => setReady(true), 1000) + } return ( <> @@ -559,8 +566,9 @@ function VideoItemInner({ left: 0, right: 0, bottom: bottom + VIDEO_PLAYER_BOTTOM_INSET, + opacity: 0, }, - isAndroid && status === 'loading' && {opacity: 0}, + isAndroid && ready && {opacity: 1}, ]} player={player} nativeControls={false}