decord/alpha/source/modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

38 lines
1.2 KiB
TypeScript

// Module ID: 17634
// Function ID: 17635
// Name: useExternalPipAspectRatioUpdater
// Dependencies: [19, 9776, 2]
// Exports: default
// Module 17634 (useExternalPipAspectRatioUpdater)
import ExternalPipDefault from "ExternalPip" /* 9776 */;
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);
};