Files
discord-decomp/sources/modules/video_calls/participantHasVideo.tsx
T
2026-07-27 16:20:00 +03:00

63 lines
3.1 KiB
TypeScript

/* Metro module 10692; source: modules/video_calls/participantHasVideo.tsx; dependencies: [1226, 4259, 4299, 566, 2] */
function _fun82176(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:6, offset: 0x01eedbfd, size: 206 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = participantHasVideo;
const closure2 = canRenderParticipantVideo;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
const env0_4 = callConstantsModule.ParticipantTypes;
const env0_5 = callConstantsModule.isStreamParticipant;
const env0_6 = callConstantsModule.isUserParticipant;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/participantHasVideo.tsx');
exports.default = closure;
exports.canRenderParticipantVideo = closure2;
exports.useCanRenderParticipantVideo = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([MediaEngineStore], _fun82180);
};
}
function participantHasVideo(a0) { // fn#82177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:193, offset: 0x01eedccb, size: 94 bytes, params: 2, frame: 14
const type = a0.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return type !== ACTIVITY && (isStreamParticipant(a0) ? a0.streamId != null : a0.voiceState?.selfVideo ?? a0.voiceState?.selfVideo != null);
}
function canRenderParticipantVideo(a0) { // fn#82178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:340, offset: 0x01eedd29, size: 140 bytes, params: 2, frame: 18
var r2;
var r1;
var r0;
var value2;
var isStreamParticipant2;
let value = a1;
const r6 = value !== undefined ? value : MediaEngineStore;
value = a0 != null;
if (value) {
value2 = participantHasVideo(a0);
if (value2) {
isStreamParticipant2 = isStreamParticipant(a0);
r2 = isStreamParticipant2 ? a0.user.id !== AuthenticationStore.getId() : !isStreamParticipant2;
if (r2) {
value = isUserParticipant(a0);
r2 = value ? !r6.isLocalVideoDisabled(a0.id) : !value;
}
r1 = r2;
} else {
r1 = !!value2;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function useCanRenderParticipantVideo(a0) { // fn#82179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:691, offset: 0x01eeddb5, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun82180);
}