decord/source/modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

39 lines
1.3 KiB
TypeScript

// Module ID: 17092
// Function ID: 17093
// Name: useExternalPipAspectRatioUpdater
// Dependencies: [19, 9615, 2]
// Exports: default
// Module 17092 (useExternalPipAspectRatioUpdater)
import closure_2 from "noop" /* 19 */;
const result = require("set").fileFinishedImporting("modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx");
export default function useExternalPipAspectRatioUpdater(arg0, arg1, first) {
closure_0 = arg1;
closure_1 = first;
React = React.useRef(first);
const insertionEffect = React.useInsertionEffect(() => {
closure_2.current = closure_1;
});
const items = [arg1];
const effect = React.useEffect(() => {
lib = lib.getTargetDimensions(ref.current);
lib(table[1]).setPipAspectRatio(lib.width, lib.height);
return lib.subscribeFromItem(() => {
targetDimensions = targetDimensions.getTargetDimensions(closure_1_2.current);
({ width, height } = targetDimensions);
let tmp2 = width === obj.width;
if (tmp2) {
tmp2 = height === obj.height;
}
if (!tmp2) {
obj = { width: null, height: null };
obj[0] = width;
obj[1] = height;
targetDimensions(table[1]).setPipAspectRatio(width, height);
const obj2 = targetDimensions(table[1]);
}
});
}, items);
};