decord/alpha/source/modules/video_calls/useIsStreamFocused.tsx

78 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-10-03 08:58:59 +00:00
// Module ID: 9152
// Function ID: 9153
2026-07-20 16:05:17 +00:00
// Name: useIsStreamFocused
2026-10-03 08:58:59 +00:00
// Dependencies: [4906, 4911, 558, 576, 504, 2]
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
// Module 9152 (useIsStreamFocused)
import CallConstants from "CallConstants" /* 4911 */;
import ChannelRTCStore from "ChannelRTCStore" /* 4906 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-03 08:58:59 +00:00
const isStreamParticipant = CallConstants.isStreamParticipant;
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
let closure_0;
let first;
let tmp6;
let tmp8;
_require = arg0;
const tmp = _require;
const obj = require("react");
const cResult = obj.c(5);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [ChannelRTCStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function s() {
let selectedParticipant = null;
if (null != closure_0) {
selectedParticipant = ChannelRTCStore.getSelectedParticipant(tmp);
}
return selectedParticipant;
};
cResult[1] = arg0;
cResult[2] = fn;
tmp6 = fn;
} else {
tmp6 = cResult[2];
}
const tmpResult = tmp(504);
const stateFromStores = tmpResult.useStateFromStores(first, tmp6);
if (cResult[3] !== stateFromStores) {
const tmp10 = null != stateFromStores && isStreamParticipant(stateFromStores);
cResult[3] = stateFromStores;
cResult[4] = tmp10;
tmp8 = tmp10;
} else {
tmp8 = cResult[4];
}
return tmp8;
}) : ((arg0) => {
let closure_0;
_require = arg0;
const items = [ChannelRTCStore];
2026-10-03 08:58:59 +00:00
const obj = require("get initialized");
const stateFromStores = obj.useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let selectedParticipant = null;
2026-07-23 10:11:24 +00:00
if (null != closure_0) {
selectedParticipant = ChannelRTCStore.getSelectedParticipant(tmp);
2026-07-20 16:05:17 +00:00
}
return selectedParticipant;
});
let tmp2 = null != stateFromStores;
if (tmp2) {
tmp2 = isStreamParticipant(stateFromStores);
}
return tmp2;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/video_calls/useIsStreamFocused.tsx");
export const useIsStreamFocused = tmp2;