decord/beta/source/modules/media_engine/useMuteAwareLocalVolume.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

115 lines
3.3 KiB
TypeScript

// Module ID: 10271
// Function ID: 10272
// Name: useMuteAwareLocalVolume
// Dependencies: [19, 1996, 558, 568, 504, 9889, 2]
// Module 10271 (useMuteAwareLocalVolume)
import AudioActionCreatorsDefault from "AudioActionCreators" /* 9889 */;
import noop from "module_19" /* 19 */;
import MediaEngineStore from "MediaEngineStore" /* 1996 */;
const require = globalThis.__r;
const require = fn;
const ReactCompilerGating = fn(558);
const size = fn(2);
const result = size.fileFinishedImporting("modules/media_engine/useMuteAwareLocalVolume.tsx");
export default ReactCompilerGating.isReactCompilerEnabled() ? ((arg0, arg1) => {
_require = arg0;
closure_1 = arg1;
const cResult = require("c").c(10);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [MediaEngineStore];
cResult[0] = items;
let first = items;
} else {
first = cResult[0];
}
if (cResult[1] === arg1) {
if (cResult[2] === arg0) {
let tmp6 = cResult[3];
}
const stateFromStores = require("initialize").useStateFromStores(first, tmp6);
if (cResult[4] === arg1) {
if (cResult[5] === arg0) {
let tmp8 = cResult[6];
}
if (cResult[7] === stateFromStores) {
if (cResult[8] === tmp8) {
let tmp9 = cResult[9];
}
return tmp9;
}
let obj2 = { effectiveVolume: stateFromStores, handleVolumeChange: tmp8 };
cResult[7] = stateFromStores;
cResult[8] = tmp8;
cResult[9] = obj2;
tmp9 = obj2;
}
const fn2 = function s(arg0) {
if (null != closure_0) {
let isLocalMuteResult = arg0 > 0;
if (isLocalMuteResult) {
isLocalMuteResult = MediaEngineStore.isLocalMute(tmp, closure_1);
}
if (isLocalMuteResult) {
AudioActionCreatorsDefault.toggleLocalMute(tmp, closure_1);
}
AudioActionCreatorsDefault.setLocalVolume(tmp, arg0, closure_1);
}
};
cResult[4] = arg1;
cResult[5] = arg0;
cResult[6] = fn2;
tmp8 = fn2;
const tmpResult = require("initialize");
}
const fn = function c() {
let num = 0;
if (null != closure_0) {
num = 0;
if (!MediaEngineStore.isLocalMute(tmp, closure_1)) {
num = obj.getLocalVolume(tmp, tmp2);
}
obj = MediaEngineStore;
tmp2 = closure_1;
}
return num;
};
cResult[1] = arg1;
cResult[2] = arg0;
cResult[3] = fn;
tmp6 = fn;
}) : ((arg0, arg1) => {
_require = arg0;
closure_1 = arg1;
let obj = { effectiveVolume: null, handleVolumeChange: null };
const items = [MediaEngineStore];
obj.effectiveVolume = require("initialize").useStateFromStores(items, () => {
let num = 0;
if (null != closure_0) {
num = 0;
if (!MediaEngineStore.isLocalMute(tmp, closure_1)) {
num = obj.getLocalVolume(tmp, tmp2);
}
obj = MediaEngineStore;
tmp2 = closure_1;
}
return num;
});
const items1 = [arg0, arg1];
obj.handleVolumeChange = noop.useCallback((arg0) => {
if (null != closure_0) {
let isLocalMuteResult = arg0 > 0;
if (isLocalMuteResult) {
isLocalMuteResult = MediaEngineStore.isLocalMute(tmp, closure_1);
}
if (isLocalMuteResult) {
AudioActionCreatorsDefault.toggleLocalMute(tmp, closure_1);
}
AudioActionCreatorsDefault.setLocalVolume(tmp, arg0, closure_1);
}
}, items1);
return obj;
});