// Module ID: 9705 // Function ID: 9706 // Name: participantHasVideo // Dependencies: [502, 1996, 4779, 4783, 558, 568, 504, 2] // Exports: default // Module 9705 (participantHasVideo) import AuthenticationStore from "AuthenticationStore" /* 502 */; import MediaEngineStore from "MediaEngineStore" /* 1996 */; const require = globalThis.__r; const require = fn; function canRenderParticipantVideo(participant, MediaEngineStore) { let obj = MediaEngineStore; if (MediaEngineStore === undefined) { obj = MediaEngineStore; } let tmp = null != participant; if (tmp) { let tmp3 = participant.type !== constants.ACTIVITY; if (tmp3) { const supportsResult = MediaEngineStore.supports(Features.VIDEO); if (!supportsResult) { tmp3 = supportsResult; } else if (hasOwnProperty(participant)) { let flag = null != participant.streamId; } else { const voiceState = participant.voiceState; flag = undefined; if (voiceState != null) { flag = voiceState.selfVideo; } if (flag == null) { flag = false; } } } let tmp9 = tmp3; if (tmp9) { const tmp11 = hasOwnProperty(participant); let tmp12 = !tmp11; if (tmp11) { tmp12 = participant.user.id !== AuthenticationStore.getId(); } if (tmp12) { const tmp15 = timestampProducer(participant); let tmp16 = !tmp15; if (tmp15) { tmp16 = !obj.isLocalVideoDisabled(participant.id); } tmp12 = tmp16; } tmp9 = tmp12; } tmp = tmp9; } return tmp; } const CallConstants = fn(4779); ({ ParticipantTypes: closure_4, isStreamParticipant: hasOwnProperty, isUserParticipant: metroRequire } = CallConstants); const Features = fn(4783).Features; const ReactCompilerGating = fn(558); function participantHasVideo(type) { let streamId = type; let tmp = type.type !== constants.ACTIVITY; if (tmp) { const supportsResult = MediaEngineStore.supports(Features.VIDEO); if (!supportsResult) { tmp = supportsResult; } else if (hasOwnProperty(streamId)) { streamId = streamId.streamId; let flag = null != streamId; } else { const voiceState = streamId.voiceState; flag = undefined; if (voiceState != null) { flag = voiceState.selfVideo; } if (flag == null) { flag = false; } } } return tmp; } const size = fn(2); const result = size.fileFinishedImporting("modules/video_calls/participantHasVideo.tsx"); export default participantHasVideo; export { canRenderParticipantVideo }; export const useCanRenderParticipantVideo = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => { _require = arg0; const cResult = require("c").c(3); if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) { const items = [MediaEngineStore]; cResult[0] = items; let first = items; } else { first = cResult[0]; } if (cResult[1] !== arg0) { const fn = function o() { return canRenderParticipantVideo(closure_0, MediaEngineStore); }; cResult[1] = arg0; cResult[2] = fn; let tmp6 = fn; } else { tmp6 = cResult[2]; } const obj = require("c"); return require("initialize").useStateFromStores(first, tmp6); }) : ((arg0) => { _require = arg0; const items = [MediaEngineStore]; return require("initialize").useStateFromStores(items, () => canRenderParticipantVideo(closure_0, MediaEngineStore)); });