decord/source/modules/device/native/applyOrientationLock.tsx
2026-08-24 06:08:38 +00:00

36 lines
1.4 KiB
TypeScript

// Module ID: 11003
// Function ID: 11004
// Name: applyOrientationLock
// Dependencies: [8713, 8708, 2]
// Exports: applyOrientationLock, releaseOrientationLock, restoreDefaultOrientationLock
// Module 11003 (applyOrientationLock)
import set from "set" /* 2 */;
import handleOrientationChange from "handleOrientationChange" /* 8708 */;
import isOrientationLockSupportedDefault from "isOrientationLockSupported" /* 8713 */;
let result = set.fileFinishedImporting("modules/device/native/applyOrientationLock.tsx");
export const applyOrientationLock = function applyOrientationLock(PORTRAIT, flag) {
if (flag === undefined) {
flag = true;
}
if (isOrientationLockSupportedDefault()) {
handleOrientationChange.lockOrientation(PORTRAIT, flag);
const obj = handleOrientationChange;
}
};
export const releaseOrientationLock = function releaseOrientationLock(unlockAfterRotatingToPreviousLock) {
if (isOrientationLockSupportedDefault()) {
let obj = handleOrientationChange;
obj = { unlockAfterRotatingToPreviousLock: null };
obj[0] = unlockAfterRotatingToPreviousLock.unlockAfterRotatingToPreviousLock;
obj.unlockOrientation(obj);
}
};
export const restoreDefaultOrientationLock = function restoreDefaultOrientationLock() {
if (isOrientationLockSupportedDefault()) {
const result = handleOrientationChange.restoreDefaultOrientation();
const obj = handleOrientationChange;
}
};