decord/source/modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16402
// Function ID: 16403
2026-07-20 16:05:17 +00:00
// Name: useExternalPipAspectRatioUpdater
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 10066, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 16402 (useExternalPipAspectRatioUpdater)
import closure_2 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function useExternalPipAspectRatioUpdater(arg0, arg1, stateFromStores) {
2026-08-24 06:08:38 +00:00
closure_0 = arg1;
closure_1 = stateFromStores;
2026-07-29 08:29:29 +00:00
React = React.useRef(stateFromStores);
2026-07-20 16:05:17 +00:00
const insertionEffect = React.useInsertionEffect(() => {
2026-08-24 06:08:38 +00:00
closure_2.current = closure_1;
2026-07-20 16:05:17 +00:00
});
const items = [arg1];
2026-07-23 10:11:24 +00:00
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
lib = lib.getTargetDimensions(ref.current);
lib(stateFromStores[1]).setPipAspectRatio(lib.width, lib.height);
return lib.subscribeFromItem(() => {
2026-08-24 06:08:38 +00:00
targetDimensions = targetDimensions.getTargetDimensions(closure_1_2.current);
2026-07-20 16:05:17 +00:00
({ width, height } = targetDimensions);
2026-07-23 10:11:24 +00:00
let tmp2 = width === obj.width;
2026-07-20 16:05:17 +00:00
if (tmp2) {
2026-07-23 10:11:24 +00:00
tmp2 = height === obj.height;
2026-07-20 16:05:17 +00:00
}
if (!tmp2) {
2026-07-29 08:29:29 +00:00
obj = { width: null, height: null };
obj[0] = width;
obj[1] = height;
targetDimensions(table[1]).setPipAspectRatio(width, height);
const obj2 = targetDimensions(table[1]);
2026-07-20 16:05:17 +00:00
}
});
}, items);
};