forked from waleedAli2408/react-native-video-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OrientationInterface.d.ts
20 lines (20 loc) · 993 Bytes
/
OrientationInterface.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { FullscreenOrientation, VideoContext } from './ScreenContainer';
export declare type OrientationValue = 'PORTRAIT' | 'LANDSCAPE-LEFT' | 'LANDSCAPE-RIGHT' | 'PORTRAIT-UPSIDEDOWN' | 'FACE-UP' | 'FACE-DOWN' | 'UNKNOWN';
interface Callback {
(orientation: OrientationValue): void;
}
interface OrientationLib {
lockToPortrait: () => void;
getDeviceOrientation: (callback: Callback) => void;
addDeviceOrientationListener: (callback: Callback) => void;
removeDeviceOrientationListener: (callback: Callback) => void;
unlockAllOrientations: () => void;
}
export declare function connectOrientationLib(ExternalOrientation: OrientationLib): void;
declare const useOrientationEffect: ({ fullscreen, setFullscreen, isLandscape, }: {
fullscreen: VideoContext['fullscreen'];
setFullscreen: VideoContext['setFullscreen'];
isLandscape: boolean;
}) => void;
export declare const useDeviceOrientation: () => FullscreenOrientation;
export default useOrientationEffect;