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

85 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 9236
// Function ID: 9237
2026-07-20 16:05:17 +00:00
// Name: useIsUserSecureFramesVerified
2026-08-12 06:57:52 +00:00
// Dependencies: [1218, 4415, 9237, 9274, 589, 9279, 4407, 2]
2026-07-20 16:05:17 +00:00
// Exports: useIsCallSecureFramesVerified, useIsStreamSecureFramesVerified, useIsUserSecureFramesVerified
2026-08-12 06:57:52 +00:00
// Module 9236 (useIsUserSecureFramesVerified)
2026-07-29 08:29:29 +00:00
import fetchFingerprint from "fetchFingerprint";
import createRTCConnection from "createRTCConnection";
import computeCallVerification from "computeCallVerification";
2026-07-22 07:54:56 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("computeCallVerification").fileFinishedImporting("modules/rtc/hooks/useIsSecureFramesVerified.tsx");
2026-07-20 16:05:17 +00:00
export const useIsUserSecureFramesVerified = function useIsUserSecureFramesVerified(channelId) {
const userId = channelId.userId;
2026-07-29 08:29:29 +00:00
let isSecureFramesUIEnabled;
2026-07-23 10:11:24 +00:00
isSecureFramesUIEnabled = userId(isSecureFramesUIEnabled[3]).useIsSecureFramesUIEnabled({ channelId: channelId.channelId });
const obj = userId(isSecureFramesUIEnabled[3]);
2026-07-29 08:29:29 +00:00
const items = [computeCallVerification, fetchFingerprint, createRTCConnection];
2026-07-20 16:05:17 +00:00
const items1 = [isSecureFramesUIEnabled, userId];
2026-07-23 10:11:24 +00:00
return userId(isSecureFramesUIEnabled[4]).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let isUserConnectedResult = null != userId && isSecureFramesUIEnabled;
if (isUserConnectedResult) {
2026-07-29 08:29:29 +00:00
isUserConnectedResult = outer1_3.isUserConnected(tmp);
2026-07-20 16:05:17 +00:00
}
if (isUserConnectedResult) {
2026-07-29 08:29:29 +00:00
isUserConnectedResult = outer1_2.getId() !== tmp;
2026-07-20 16:05:17 +00:00
}
if (isUserConnectedResult) {
2026-07-29 08:29:29 +00:00
isUserConnectedResult = outer1_4.isUserVerified(tmp);
2026-07-20 16:05:17 +00:00
}
return isUserConnectedResult;
}, items1);
};
export const useIsStreamSecureFramesVerified = function useIsStreamSecureFramesVerified(channelId) {
const streamKey = channelId.streamKey;
2026-07-29 08:29:29 +00:00
let isSecureFramesUIEnabled;
let isStreamRTCConnectionEmpty;
2026-07-23 10:11:24 +00:00
isSecureFramesUIEnabled = streamKey(isSecureFramesUIEnabled[3]).useIsSecureFramesUIEnabled({ channelId: channelId.channelId });
const obj = streamKey(isSecureFramesUIEnabled[3]);
2026-07-29 08:29:29 +00:00
isStreamRTCConnectionEmpty = streamKey(isSecureFramesUIEnabled[5]).useIsStreamRTCConnectionEmpty(streamKey);
2026-07-23 10:11:24 +00:00
const obj2 = streamKey(isSecureFramesUIEnabled[5]);
2026-07-29 08:29:29 +00:00
const items = [computeCallVerification, isStreamRTCConnectionEmpty];
2026-07-20 16:05:17 +00:00
const items1 = [isStreamRTCConnectionEmpty, isSecureFramesUIEnabled, streamKey];
2026-07-23 10:11:24 +00:00
return streamKey(isSecureFramesUIEnabled[4]).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
if (isSecureFramesUIEnabled) {
if (!isStreamRTCConnectionEmpty) {
if (null == streamKey) {
return false;
} else {
const id = isStreamRTCConnectionEmpty.getId();
2026-07-29 08:29:29 +00:00
let isStreamVerifiedResult = streamKey(isSecureFramesUIEnabled[6]).decodeStreamKey(tmp2).ownerId !== id;
2026-07-20 16:05:17 +00:00
if (isStreamVerifiedResult) {
2026-07-29 08:29:29 +00:00
isStreamVerifiedResult = outer1_4.isStreamVerified(tmp2);
2026-07-20 16:05:17 +00:00
}
return isStreamVerifiedResult;
}
}
}
return false;
}, items1);
};
export const useIsCallSecureFramesVerified = function useIsCallSecureFramesVerified(channelId) {
2026-07-29 08:29:29 +00:00
let isSecureFramesUIEnabled;
let isCallRTCConnectionEmpty;
2026-07-23 10:11:24 +00:00
isSecureFramesUIEnabled = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[3]).useIsSecureFramesUIEnabled({ channelId: channelId.channelId });
const obj = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[3]);
isCallRTCConnectionEmpty = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[5]).useIsCallRTCConnectionEmpty();
const obj2 = isSecureFramesUIEnabled(isCallRTCConnectionEmpty[5]);
2026-07-29 08:29:29 +00:00
const items = [computeCallVerification];
2026-07-20 16:05:17 +00:00
const items1 = [isCallRTCConnectionEmpty, isSecureFramesUIEnabled];
2026-07-23 10:11:24 +00:00
return isSecureFramesUIEnabled(isCallRTCConnectionEmpty[4]).useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
let tmp = !isSecureFramesUIEnabled;
if (isSecureFramesUIEnabled) {
tmp = isCallRTCConnectionEmpty;
}
let isCallVerifiedResult = !tmp;
if (!tmp) {
2026-07-23 10:11:24 +00:00
isCallVerifiedResult = outer1_4.isCallVerified();
2026-07-20 16:05:17 +00:00
}
return isCallVerifiedResult;
}, items1);
};