decord/source/modules/rtc/hooks/useIsEmptyRTCConnection.tsx

56 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 9265
// Function ID: 9266
// Name: useIsEmptyRTCConnection
// Dependencies: [502, 4630, 4646, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: useIsCallRTCConnectionEmpty, useIsStreamRTCConnectionEmpty
// Module 9265 (useIsEmptyRTCConnection)
import initialize from "initialize" /* 504 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4630 */;
import StreamRTCConnectionStore from "StreamRTCConnectionStore" /* 4646 */;
2026-07-20 16:05:17 +00:00
const require = globalThis.__r;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/rtc/hooks/useIsEmptyRTCConnection.tsx");
2026-07-20 16:05:17 +00:00
export const useIsStreamRTCConnectionEmpty = function useIsStreamRTCConnectionEmpty(stateFromStores4) {
_require = stateFromStores4;
const items = [StreamRTCConnectionStore, AuthenticationStore];
return require("initialize").useStateFromStores(items, () => {
2026-07-23 10:11:24 +00:00
if (null == closure_0) {
2026-07-20 16:05:17 +00:00
return true;
} else {
const userIds = StreamRTCConnectionStore.getUserIds(tmp);
2026-07-29 08:29:29 +00:00
let tmp3 = null == userIds;
if (!tmp3) {
let tmp6 = 0 === userIds.size;
if (!tmp6) {
tmp6 = 1 === userIds.size && userIds.has(tmp5);
const tmp7 = 1 === userIds.size && userIds.has(tmp5);
}
tmp3 = tmp6;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
}
});
};
export const useIsCallRTCConnectionEmpty = function useIsCallRTCConnectionEmpty() {
const items = [RTCConnectionStore, AuthenticationStore];
2026-08-24 06:08:38 +00:00
return initialize.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
userIds = userIds.getUserIds();
let tmp = null == userIds;
if (!tmp) {
let tmp4 = 0 === userIds.size;
if (!tmp4) {
tmp4 = 1 === userIds.size && userIds.has(tmp3);
const tmp5 = 1 === userIds.size && userIds.has(tmp3);
}
tmp = tmp4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
});
};