decord/source/modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

58 lines
2.3 KiB
TypeScript

// Module ID: 9254
// Function ID: 9255
// Name: useIsSecureFramesKeyInconsistent
// Dependencies: [19, 4630, 4646, 504, 9242, 2]
// Exports: useAlertIfSecureFramesKeyInconsistent, useIsSecureFramesKeyInconsistent
// Module 9254 (useIsSecureFramesKeyInconsistent)
import SecureFramesUtils from "SecureFramesUtils" /* 9242 */;
import noop from "module_19" /* 19 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4630 */;
import StreamRTCConnectionStore from "StreamRTCConnectionStore" /* 4646 */;
require = fn;
const size = fn(2);
let result = size.fileFinishedImporting("modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx");
export const useIsSecureFramesKeyInconsistent = function useIsSecureFramesKeyInconsistent(userId) {
userId = userId.userId;
const items = [RTCConnectionStore, StreamRTCConnectionStore];
return userId(504).useStateFromStores(items, () => {
const items = [RTCConnectionStore, StreamRTCConnectionStore];
return SecureFramesUtils.getIsSecureFramesKeyInconsistent(channelId, items);
});
};
export const useAlertIfSecureFramesKeyInconsistent = function useAlertIfSecureFramesKeyInconsistent(channelId) {
channelId = channelId.channelId;
const userId = channelId.userId;
const nickname = channelId.nickname;
const onAlertOpen = channelId.onAlertOpen;
let stateFromStores;
closure_129_0 = userId;
let items = [onAlertOpen, stateFromStores];
stateFromStores = channelId(userId[3]).useStateFromStores(items, () => {
const items = [RTCConnectionStore, StreamRTCConnectionStore];
return SecureFramesUtils.getIsSecureFramesKeyInconsistent(channelId, items);
});
nickname.useRef(null);
const items1 = [channelId, stateFromStores, nickname, onAlertOpen, userId];
const effect = nickname.useEffect(() => {
if (stateFromStores) {
if (null == ref.current) {
const _setTimeout = setTimeout;
tmp.current = setTimeout(() => {
onAlertOpen();
const result = channelId(userId[4]).showSecureFramesKeyInconsistentAlert({ userId, channelId: current, nickname });
}, 1000);
let tmp3 = tmp;
}
const current = tmp3.current;
return () => {
clearTimeout(current);
};
}
tmp3 = ref;
clearTimeout(ref.current);
ref.current = null;
}, items1);
};