@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.
31 lines (30 loc) • 1.04 kB
JavaScript
;
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.js";
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);
}
};
//# sourceMappingURL=lockOrientation.js.map