Skip to content

Commit

Permalink
fix: hiding poster
Browse files Browse the repository at this point in the history
  • Loading branch information
moskalakamil authored Nov 27, 2024
1 parent b1facac commit 8433727
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(

const onVideoLoad = useCallback(
(e: NativeSyntheticEvent<OnLoadData>) => {
hasPoster && setShowPoster(false);
if (Platform.OS === 'windows') {
hasPoster && setShowPoster(false);
}
onLoad?.(e.nativeEvent);
},
[onLoad, hasPoster, setShowPoster],
Expand Down Expand Up @@ -771,7 +773,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
const _style: StyleProp<ViewStyle> = useMemo(
() => ({
...StyleSheet.absoluteFillObject,
...(showPoster ? {display: 'none'} : {}),
...(showPoster ? {zIndex: 1} : {}),
}),
[showPoster],
);
Expand Down

0 comments on commit 8433727

Please sign in to comment.