UNPKG

@zezosoft/zezo-ott-react-native-video-player

Version:

React Native OTT Video Player for Android & iOS. Supports playlists, seasons, auto-next playback, subtitles, theming, analytics, fullscreen mode, and custom controls. 🚀 Powered by ZezoSoft.

35 lines (30 loc) • 992 B
import { StatusBar, Platform } from 'react-native'; import Orientation from 'react-native-orientation-locker'; import SystemNavigationBar from 'react-native-system-navigation-bar'; import PlatformSelector from './PlatformSelector'; export const lockToPortrait = () => { try { Orientation.lockToPortrait(); StatusBar.setHidden(false, 'fade'); if (PlatformSelector.isAndroid()) { SystemNavigationBar.fullScreen(false); SystemNavigationBar.navigationShow(); } else if (Platform.OS === 'ios') { } } catch (error) { console.warn('Error locking to portrait:', error); } }; export const lockToLandscape = () => { try { Orientation.lockToLandscape(); StatusBar.setHidden(true, 'fade'); if (PlatformSelector.isAndroid()) { SystemNavigationBar.fullScreen(true); SystemNavigationBar.stickyImmersive(); } else if (Platform.OS === 'ios') { } } catch (error) { console.warn('Error locking to landscape:', error); } };