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

58 lines
1.9 KiB
TypeScript
Raw Normal View History

// Module ID: 9186
// Function ID: 9187
// Name: useIsEmptyRTCConnection
// Dependencies: [502, 4859, 4875, 504, 2]
// Exports: useIsCallRTCConnectionEmpty, useIsStreamRTCConnectionEmpty
// Module 9186 (useIsEmptyRTCConnection)
2026-10-01 14:13:23 +00:00
import get_initialized from "get initialized" /* 504 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4859 */;
import StreamRTCConnectionStore from "StreamRTCConnectionStore" /* 4875 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const require = globalThis.__r;
2026-10-01 14:13:23 +00:00
let _require;
const result = size.fileFinishedImporting("modules/rtc/hooks/useIsEmptyRTCConnection.tsx");
export const useIsStreamRTCConnectionEmpty = function useIsStreamRTCConnectionEmpty(stateFromStores4) {
_require = stateFromStores4;
const items = [StreamRTCConnectionStore, AuthenticationStore];
2026-10-01 14:13:23 +00:00
const obj = require("get initialized");
return obj.useStateFromStores(items, () => {
if (null == stateFromStores4) {
return true;
} else {
const userIds = StreamRTCConnectionStore.getUserIds(tmp);
let tmp3 = null == userIds;
if (!tmp3) {
let tmp6 = 0 === userIds.size;
if (!tmp6) {
tmp6 = 1 === userIds.size && userIds.has(tmp5);
2026-10-01 14:13:23 +00:00
1 === userIds.size && userIds.has(tmp5);
}
tmp3 = tmp6;
}
return tmp3;
}
});
};
export const useIsCallRTCConnectionEmpty = function useIsCallRTCConnectionEmpty() {
const items = [RTCConnectionStore, AuthenticationStore];
2026-10-01 14:13:23 +00:00
const obj = get_initialized;
return obj.useStateFromStores(items, () => {
userIds = userIds.getUserIds();
let tmp = null == userIds;
if (!tmp) {
let tmp4 = 0 === userIds.size;
if (!tmp4) {
tmp4 = 1 === userIds.size && userIds.has(tmp3);
2026-10-01 14:13:23 +00:00
1 === userIds.size && userIds.has(tmp3);
}
tmp = tmp4;
}
return tmp;
});
};