From e18769ab3a6a7f4ebc459ab550f105f4d18f8201 Mon Sep 17 00:00:00 2001 From: Olivier Bouillet <62574056+freeboub@users.noreply.github.com> Date: Fri, 6 Sep 2024 09:45:24 +0200 Subject: [PATCH] fix(sample): remove warning on ios with NavigationBar (#4148) * fix(sample): remove warning on ios with NavigationBar --- examples/basic/src/VideoPlayer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/basic/src/VideoPlayer.tsx b/examples/basic/src/VideoPlayer.tsx index 53e36e2d..18d557ae 100644 --- a/examples/basic/src/VideoPlayer.tsx +++ b/examples/basic/src/VideoPlayer.tsx @@ -34,7 +34,7 @@ import Video, { } from 'react-native-video'; import styles from './styles'; import {type AdditionalSourceInfo} from './types'; -import {bufferConfig, srcList, textTracksSelectionBy} from './constants'; +import {bufferConfig, isAndroid, srcList, textTracksSelectionBy} from './constants'; import {Overlay, toast, VideoLoader} from './components'; import * as NavigationBar from 'expo-navigation-bar'; @@ -106,7 +106,9 @@ const VideoPlayer: FC = ({}) => { }, [goToChannel, srcListId]); useEffect(() => { - NavigationBar.setVisibilityAsync('visible'); + if (isAndroid) { + NavigationBar.setVisibilityAsync('visible'); + } }, []); const onAudioTracks = (data: OnAudioTracksData) => {