decord/source/modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx

60 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 9897
// Function ID: 9898
2026-07-20 16:05:17 +00:00
// Name: areParticipantStatesEqual
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 1390, 4396, 4402, 4431, 4399, 4401, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 9897 (areParticipantStatesEqual)
2026-08-24 06:08:38 +00:00
import closure_2 from "_slicedToArray" /* 32 */;
import closure_3 from "participantFromServer" /* 1390 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "getParticipants" /* 4396 */;
import closure_5 from "reset" /* 4402 */;
import closure_6 from "_detectH265HardwareDecode" /* 4431 */;
import closure_7 from "updateVoiceState" /* 4399 */;
import { isActivityParticipant } from "ParticipantTypes" /* 4401 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function areParticipantStatesEqual(arg0, arg1) {
[, tmp] = arg0;
[, tmp2] = arg1;
return tmp === tmp2;
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx");
2026-07-20 16:05:17 +00:00
export default function useIsPrivateAudioOnlyCall(id) {
2026-07-23 10:11:24 +00:00
const _require = id;
2026-08-24 06:08:38 +00:00
let items = [closure_4];
2026-07-20 16:05:17 +00:00
const items1 = [id];
2026-07-29 08:29:29 +00:00
let tmp3 = embeddedActivitiesForChannel.getEmbeddedActivitiesForChannel(id.id).length > 0;
if (!tmp3) {
tmp3 = isActivityParticipant(callback(obj.useStateFromStores(items, () => {
2026-08-24 06:08:38 +00:00
const items = [closure_1_4.getSelectedParticipant(_private.id), closure_1_4.getParticipantsVersion(_private.id)];
2026-07-20 16:05:17 +00:00
return items;
}, items1, areParticipantStatesEqual), 1)[0]);
}
2026-08-24 06:08:38 +00:00
dependencyMap = tmp3;
2026-07-29 08:29:29 +00:00
obj = _require(589);
const tmp = _require;
2026-08-24 06:08:38 +00:00
const items2 = [closure_7, closure_6, closure_5];
2026-07-29 08:29:29 +00:00
const items3 = [id, tmp3];
return _require(589).useStateFromStores(items2, () => {
2026-07-23 10:11:24 +00:00
let isPrivateResult = _private.isPrivate();
2026-07-20 16:05:17 +00:00
if (isPrivateResult) {
2026-08-24 06:08:38 +00:00
isPrivateResult = !closure_1_7.hasVideo(tmp.id);
2026-07-20 16:05:17 +00:00
}
if (isPrivateResult) {
2026-07-23 10:11:24 +00:00
isPrivateResult = !closure_1;
2026-07-20 16:05:17 +00:00
}
if (isPrivateResult) {
2026-08-24 06:08:38 +00:00
isPrivateResult = 0 === closure_1_5.getAllApplicationStreamsForChannel(tmp.id).length;
2026-07-20 16:05:17 +00:00
}
if (isPrivateResult) {
2026-08-24 06:08:38 +00:00
isPrivateResult = 0 === closure_1_5.getAllActiveStreamsForChannel(tmp.id).length;
2026-07-20 16:05:17 +00:00
}
if (isPrivateResult) {
2026-08-24 06:08:38 +00:00
isPrivateResult = !closure_1_6.isVideoEnabled();
2026-07-20 16:05:17 +00:00
}
return isPrivateResult;
}, items3);
};