trash
This commit is contained in:
@@ -546,6 +546,13 @@ function VideoItemInner({
|
|||||||
}) {
|
}) {
|
||||||
const {bottom} = useSafeAreaInsets()
|
const {bottom} = useSafeAreaInsets()
|
||||||
const {status} = useEvent(player, 'statusChange', {status: player.status})
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -559,8 +566,9 @@ function VideoItemInner({
|
|||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: bottom + VIDEO_PLAYER_BOTTOM_INSET,
|
bottom: bottom + VIDEO_PLAYER_BOTTOM_INSET,
|
||||||
|
opacity: 0,
|
||||||
},
|
},
|
||||||
isAndroid && status === 'loading' && {opacity: 0},
|
isAndroid && ready && {opacity: 1},
|
||||||
]}
|
]}
|
||||||
player={player}
|
player={player}
|
||||||
nativeControls={false}
|
nativeControls={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user