Skip to content

Commit

Permalink
fix(sample): remove warning on ios with NavigationBar (#4148)
Browse files Browse the repository at this point in the history
* fix(sample): remove warning on ios with NavigationBar
  • Loading branch information
freeboub authored Sep 6, 2024
1 parent 4a2beaa commit e18769a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/basic/src/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -106,7 +106,9 @@ const VideoPlayer: FC<Props> = ({}) => {
}, [goToChannel, srcListId]);

useEffect(() => {
NavigationBar.setVisibilityAsync('visible');
if (isAndroid) {
NavigationBar.setVisibilityAsync('visible');
}
}, []);

const onAudioTracks = (data: OnAudioTracksData) => {
Expand Down

0 comments on commit e18769a

Please sign in to comment.