decord/alpha/source/modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

38 lines
1.2 KiB
TypeScript

// Module ID: 17158
// Function ID: 17159
// Name: useExternalPipAspectRatioUpdater
// Dependencies: [19, 9079, 2]
// Exports: default
// Module 17158 (useExternalPipAspectRatioUpdater)
import ExternalPipDefault from "ExternalPip" /* 9079 */;
import noop from "module_19" /* 19 */;
let size = fn(2);
const result = size.fileFinishedImporting("modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx");
export default function useExternalPipAspectRatioUpdater(arg0, arg1, set) {
closure_0 = arg1;
const current = set;
noop = noop.useRef(set);
const insertionEffect = noop.useInsertionEffect(() => {
closure_2.current = current;
});
const items = [arg1];
const effect = noop.useEffect(() => {
size = size.getTargetDimensions(ref.current);
size(current[1]).setPipAspectRatio(size.width, size.height);
return size.subscribeFromItem(() => {
const targetDimensions = size.getTargetDimensions(ref.current);
({ width, height } = targetDimensions);
let tmp2 = width === size.width;
if (tmp2) {
tmp2 = height === size.height;
}
if (!tmp2) {
size = { width, height };
ExternalPipDefault.setPipAspectRatio(width, height);
}
});
}, items);
};