61 lines
2.1 KiB
TypeScript
61 lines
2.1 KiB
TypeScript
// Module ID: 9628
|
|
// Function ID: 9629
|
|
// Name: areParticipantStatesEqual
|
|
// Dependencies: [32, 1371, 4268, 4274, 4302, 4271, 4273, 589, 2]
|
|
// Exports: default
|
|
|
|
// Module 9628 (areParticipantStatesEqual)
|
|
import _slicedToArray from "_slicedToArray";
|
|
import participantFromServer from "participantFromServer";
|
|
import getParticipants from "getParticipants";
|
|
import reset from "reset";
|
|
import _detectH265HardwareDecode from "_detectH265HardwareDecode";
|
|
import updateVoiceState from "updateVoiceState";
|
|
import { isActivityParticipant } from "ParticipantTypes";
|
|
|
|
const require = arg1;
|
|
function areParticipantStatesEqual(arg0, arg1) {
|
|
let tmp;
|
|
let tmp2;
|
|
[, tmp] = arg0;
|
|
[, tmp2] = arg1;
|
|
return tmp === tmp2;
|
|
}
|
|
const result = require("getParticipants").fileFinishedImporting("modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx");
|
|
|
|
export default function useIsPrivateAudioOnlyCall(id) {
|
|
const _require = id;
|
|
let items = [getParticipants];
|
|
const items1 = [id];
|
|
let tmp3 = embeddedActivitiesForChannel.getEmbeddedActivitiesForChannel(id.id).length > 0;
|
|
if (!tmp3) {
|
|
tmp3 = isActivityParticipant(callback(obj.useStateFromStores(items, () => {
|
|
const items = [outer1_4.getSelectedParticipant(_private.id), outer1_4.getParticipantsVersion(_private.id)];
|
|
return items;
|
|
}, items1, areParticipantStatesEqual), 1)[0]);
|
|
}
|
|
const dependencyMap = tmp3;
|
|
obj = _require(589);
|
|
const tmp = _require;
|
|
const items2 = [updateVoiceState, _detectH265HardwareDecode, reset];
|
|
const items3 = [id, tmp3];
|
|
return _require(589).useStateFromStores(items2, () => {
|
|
let isPrivateResult = _private.isPrivate();
|
|
if (isPrivateResult) {
|
|
isPrivateResult = !outer1_7.hasVideo(tmp.id);
|
|
}
|
|
if (isPrivateResult) {
|
|
isPrivateResult = !closure_1;
|
|
}
|
|
if (isPrivateResult) {
|
|
isPrivateResult = 0 === outer1_5.getAllApplicationStreamsForChannel(tmp.id).length;
|
|
}
|
|
if (isPrivateResult) {
|
|
isPrivateResult = 0 === outer1_5.getAllActiveStreamsForChannel(tmp.id).length;
|
|
}
|
|
if (isPrivateResult) {
|
|
isPrivateResult = !outer1_6.isVideoEnabled();
|
|
}
|
|
return isPrivateResult;
|
|
}, items3);
|
|
};
|