2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 8271
|
|
|
|
|
// Function ID: 8272
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: APNGPlayer
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [19, 21, 8272, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: useAPNGPlayerControls
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 8271 (APNGPlayer)
|
2026-10-01 14:13:23 +00:00
|
|
|
import Fragment from "Fragment" /* 21 */;
|
|
|
|
|
import react from "react" /* 19 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let onLoad;
|
2026-09-26 17:57:22 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
const jsx = Fragment.jsx;
|
|
|
|
|
const forwardRefResult = react.forwardRef((onLoad, ref) => {
|
2026-09-18 19:45:33 +00:00
|
|
|
onLoad = onLoad.onLoad;
|
|
|
|
|
const merged = Object.assign(onLoad, Object.assign({ onLoad: 0 }));
|
2026-10-01 14:13:23 +00:00
|
|
|
ref = react.useRef(null);
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [onLoad];
|
2026-10-01 14:13:23 +00:00
|
|
|
const callback = react.useCallback((nativeEvent) => {
|
2026-09-18 19:45:33 +00:00
|
|
|
if (onLoad != null) {
|
|
|
|
|
tmp(nativeEvent.nativeEvent.url);
|
|
|
|
|
}
|
|
|
|
|
}, items);
|
2026-10-01 14:13:23 +00:00
|
|
|
const imperativeHandle = react.useImperativeHandle(ref, () => ({
|
2026-09-18 19:45:33 +00:00
|
|
|
play() {
|
|
|
|
|
if (null != ref.current) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const Commands = onLoad(dependencyMap[2]).Commands;
|
2026-09-18 19:45:33 +00:00
|
|
|
Commands.play(tmp.current);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pause() {
|
|
|
|
|
if (null != ref.current) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const Commands = onLoad(dependencyMap[2]).Commands;
|
2026-09-18 19:45:33 +00:00
|
|
|
Commands.pause(tmp.current);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
stop() {
|
|
|
|
|
if (null != ref.current) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const Commands = onLoad(dependencyMap[2]).Commands;
|
|
|
|
|
Commands.seek(ref.current, 0);
|
|
|
|
|
const Commands2 = onLoad(dependencyMap[2]).Commands;
|
|
|
|
|
Commands2.pause(ref.current);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
seek(arg0) {
|
|
|
|
|
if (null != ref.current) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const Commands = onLoad(dependencyMap[2]).Commands;
|
2026-09-18 19:45:33 +00:00
|
|
|
Commands.seek(tmp.current, arg0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}));
|
2026-10-01 14:13:23 +00:00
|
|
|
ref(8272);
|
2026-09-18 19:45:33 +00:00
|
|
|
const merged1 = Object.assign(merged);
|
2026-10-01 14:13:23 +00:00
|
|
|
return <tmp5 ref={ref} onLoad={callback} />;
|
2026-09-26 17:57:22 +00:00
|
|
|
});
|
2026-10-01 14:13:23 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/image/native/APNGPlayer.android.tsx");
|
|
|
|
|
|
|
|
|
|
export const useAPNGPlayerControls = function useAPNGPlayerControls(ref) {
|
|
|
|
|
let closure_0 = ref;
|
|
|
|
|
let closure_1 = react.useRef(false);
|
|
|
|
|
const items = [ref];
|
|
|
|
|
return react.useMemo(() => {
|
|
|
|
|
let ref;
|
|
|
|
|
return {
|
|
|
|
|
play() {
|
|
|
|
|
let current = null == closure_1_0.current;
|
|
|
|
|
const tmp = closure_1_0;
|
|
|
|
|
if (!current) {
|
|
|
|
|
current = ref.current;
|
|
|
|
|
}
|
|
|
|
|
if (!current) {
|
|
|
|
|
const current2 = tmp.current;
|
|
|
|
|
current2.play();
|
|
|
|
|
ref.current = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pause() {
|
|
|
|
|
let current = null != closure_1_0.current;
|
|
|
|
|
const tmp = closure_1_0;
|
|
|
|
|
if (current) {
|
|
|
|
|
current = ref.current;
|
|
|
|
|
}
|
|
|
|
|
if (current) {
|
|
|
|
|
const current2 = tmp.current;
|
|
|
|
|
current2.pause();
|
|
|
|
|
ref.current = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
stop() {
|
|
|
|
|
let current = null != closure_1_0.current;
|
|
|
|
|
const tmp = closure_1_0;
|
|
|
|
|
if (current) {
|
|
|
|
|
current = ref.current;
|
|
|
|
|
}
|
|
|
|
|
if (current) {
|
|
|
|
|
const current2 = tmp.current;
|
|
|
|
|
current2.stop();
|
|
|
|
|
ref.current = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
seek(arg0) {
|
|
|
|
|
if (null != closure_1_0.current) {
|
|
|
|
|
const current = tmp.current;
|
|
|
|
|
current.seek(arg0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}, items);
|
|
|
|
|
};
|
|
|
|
|
export const APNGPlayer = forwardRefResult;
|