2026-09-10 19:12:31 +00:00
|
|
|
// Module ID: 17182
|
|
|
|
|
// Function ID: 17183
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useExternalPipAspectRatioUpdater
|
2026-09-10 19:12:31 +00:00
|
|
|
// Dependencies: [19, 9680, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-10 19:12:31 +00:00
|
|
|
// Module 17182 (useExternalPipAspectRatioUpdater)
|
|
|
|
|
import ExternalPipDefault from "ExternalPip" /* 9680 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
let size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/external_pip/useExternalPipAspectRatioUpdater.native.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
export default function useExternalPipAspectRatioUpdater(arg0, arg1, set) {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = arg1;
|
2026-09-10 05:38:07 +00:00
|
|
|
const current = set;
|
|
|
|
|
noop = noop.useRef(set);
|
|
|
|
|
const insertionEffect = noop.useInsertionEffect(() => {
|
|
|
|
|
closure_2.current = current;
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
|
|
|
|
const items = [arg1];
|
2026-09-10 05:38:07 +00:00
|
|
|
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);
|
2026-07-20 16:05:17 +00:00
|
|
|
({ width, height } = targetDimensions);
|
2026-09-10 05:38:07 +00:00
|
|
|
let tmp2 = width === size.width;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (tmp2) {
|
2026-09-10 05:38:07 +00:00
|
|
|
tmp2 = height === size.height;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
if (!tmp2) {
|
2026-09-10 05:38:07 +00:00
|
|
|
size = { width, height };
|
|
|
|
|
ExternalPipDefault.setPipAspectRatio(width, height);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}, items);
|
|
|
|
|
};
|