decord/source/modules/rtc/hooks/useIsSecureFramesVerified.tsx
2026-08-25 06:04:03 +00:00

84 lines
3.8 KiB
TypeScript

// Module ID: 9338
// Function ID: 9339
// Name: useIsUserSecureFramesVerified
// Dependencies: [1218, 4454, 9339, 9376, 589, 9381, 4446, 2]
// Exports: useIsCallSecureFramesVerified, useIsStreamSecureFramesVerified, useIsUserSecureFramesVerified
// Module 9338 (useIsUserSecureFramesVerified)
import closure_2 from "fetchFingerprint" /* 1218 */;
import closure_3 from "createRTCConnection" /* 4454 */;
import closure_4 from "computeCallVerification" /* 9339 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/rtc/hooks/useIsSecureFramesVerified.tsx");
export const useIsUserSecureFramesVerified = function useIsUserSecureFramesVerified(channelId) {
const userId = channelId.userId;
let isSecureFramesUIEnabled;
isSecureFramesUIEnabled = userId(isSecureFramesUIEnabled[3]).useIsSecureFramesUIEnabled({ channelId: channelId.channelId });
const obj = userId(isSecureFramesUIEnabled[3]);
const items = [closure_4, closure_2, closure_3];
const items1 = [isSecureFramesUIEnabled, userId];
return userId(isSecureFramesUIEnabled[4]).useStateFromStores(items, () => {
let isUserConnectedResult = null != userId && isSecureFramesUIEnabled;
if (isUserConnectedResult) {
isUserConnectedResult = closure_1_3.isUserConnected(tmp);
}
if (isUserConnectedResult) {
isUserConnectedResult = closure_1_2.getId() !== tmp;
}
if (isUserConnectedResult) {
isUserConnectedResult = closure_1_4.isUserVerified(tmp);
}
return isUserConnectedResult;
}, items1);
};
export const useIsStreamSecureFramesVerified = function useIsStreamSecureFramesVerified(channelId) {
const streamKey = channelId.streamKey;
let isSecureFramesUIEnabled;
let isStreamRTCConnectionEmpty;
isSecureFramesUIEnabled = streamKey(isSecureFramesUIEnabled[3]).useIsSecureFramesUIEnabled({ channelId: channelId.channelId });
const obj = streamKey(isSecureFramesUIEnabled[3]);
isStreamRTCConnectionEmpty = streamKey(isSecureFramesUIEnabled[5]).useIsStreamRTCConnectionEmpty(streamKey);
const obj2 = streamKey(isSecureFramesUIEnabled[5]);
const items = [closure_4, isStreamRTCConnectionEmpty];
const items1 = [isStreamRTCConnectionEmpty, isSecureFramesUIEnabled, streamKey];
return streamKey(isSecureFramesUIEnabled[4]).useStateFromStores(items, () => {
if (isSecureFramesUIEnabled) {
if (!isStreamRTCConnectionEmpty) {
if (null == streamKey) {
return false;
} else {
const id = isStreamRTCConnectionEmpty.getId();
let isStreamVerifiedResult = streamKey(isSecureFramesUIEnabled[6]).decodeStreamKey(tmp2).ownerId !== id;
if (isStreamVerifiedResult) {
isStreamVerifiedResult = closure_1_4.isStreamVerified(tmp2);
}
return isStreamVerifiedResult;
}
}
}
return false;
}, items1);
};
export const useIsCallSecureFramesVerified = function useIsCallSecureFramesVerified(channelId) {
let isSecureFramesUIEnabled;
let isCallRTCConnectionEmpty;
isSecureFramesUIEnabled = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[3]).useIsSecureFramesUIEnabled({ channelId: channelId.channelId });
const obj = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[3]);
isCallRTCConnectionEmpty = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[5]).useIsCallRTCConnectionEmpty();
const obj2 = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[5]);
const items = [closure_4];
const items1 = [isCallRTCConnectionEmpty, isSecureFramesUIEnabled];
return isSecureFramesUIEnabled(isCallRTCConnectionEmpty[4]).useStateFromStores(items, () => {
let tmp = !isSecureFramesUIEnabled;
if (isSecureFramesUIEnabled) {
tmp = isCallRTCConnectionEmpty;
}
let isCallVerifiedResult = !tmp;
if (!tmp) {
isCallVerifiedResult = closure_1_4.isCallVerified();
}
return isCallVerifiedResult;
}, items1);
};