decord/alpha/source/modules/device/native/applyOrientationLock.tsx
github-actions 6eea20b8e1 chore: update source for alpha 348.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-24 10:59:02 +00:00

32 lines
1.3 KiB
TypeScript

// Module ID: 12124
// Function ID: 12125
// Name: applyOrientationLock
// Dependencies: [9728, 8682, 2]
// Exports: applyOrientationLock, releaseOrientationLock, restoreDefaultOrientationLock
// Module 12124 (applyOrientationLock)
import DeviceOrientation from "DeviceOrientation" /* 8682 */;
import isOrientationLockSupportedDefault from "isOrientationLockSupported" /* 9728 */;
import size from "module_2" /* 2 */;
let result = size.fileFinishedImporting("modules/device/native/applyOrientationLock.tsx");
export const applyOrientationLock = function applyOrientationLock(PORTRAIT, flag) {
if (flag === undefined) {
flag = true;
}
if (isOrientationLockSupportedDefault()) {
DeviceOrientation.lockOrientation(PORTRAIT, flag);
}
};
export const releaseOrientationLock = function releaseOrientationLock(unlockAfterRotatingToPreviousLock) {
if (isOrientationLockSupportedDefault()) {
const obj2 = { unlockAfterRotatingToPreviousLock: unlockAfterRotatingToPreviousLock.unlockAfterRotatingToPreviousLock };
DeviceOrientation.unlockOrientation(obj2);
}
};
export const restoreDefaultOrientationLock = function restoreDefaultOrientationLock() {
if (isOrientationLockSupportedDefault()) {
const result = DeviceOrientation.restoreDefaultOrientation();
}
};