decord/alpha/source/modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

58 lines
2.3 KiB
TypeScript

// Module ID: 10061
// Function ID: 10062
// Name: useIsSecureFramesKeyInconsistent
// Dependencies: [19, 4850, 4866, 504, 10049, 2]
// Exports: useAlertIfSecureFramesKeyInconsistent, useIsSecureFramesKeyInconsistent
// Module 10061 (useIsSecureFramesKeyInconsistent)
import SecureFramesUtils from "SecureFramesUtils" /* 10049 */;
import noop from "module_19" /* 19 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4850 */;
import StreamRTCConnectionStore from "StreamRTCConnectionStore" /* 4866 */;
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);
};