69 lines
3.8 KiB
TypeScript
69 lines
3.8 KiB
TypeScript
/* Metro module 10692; source: modules/video_calls/participantHasVideo.tsx; dependencies: [1226, 4259, 4299, 566, 2] */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as CallConstantsModule from '../calls/CallConstants.tsx'; /* Metro dependency 4299 */
|
|
|
|
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 participantHasVideo2 = participantHasVideo;
|
|
const canRenderParticipantVideo2 = canRenderParticipantVideo;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/participantHasVideo.tsx');
|
|
exports.default = participantHasVideo2;
|
|
exports.canRenderParticipantVideo = canRenderParticipantVideo2;
|
|
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 (FluxModule).useStateFromStores([MediaEngineStore], _fun82180);
|
|
function _fun82180() { // fn#82180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:771, offset: 0x013d7e42, size: 28 bytes, params: 1, frame: 13
|
|
return canRenderParticipantVideo(env0_0, MediaEngineStore);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun82176, 10692, [1226, 4259, 4299, 566,
|
|
2]) /* metro module 10692, dependencies: [1226, 4259, 4299, 566, 2] */;
|