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

54 lines
3.0 KiB
TypeScript

/* Metro module 9438; source: modules/video_calls/native/useIsVideoMode.tsx; dependencies: [4492, 1379, 4259, 1934, 4297, 566, 2] */
function _fun73440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:6, offset: 0x01d6cb85, size: 195 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = isVideoMode;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useIsVideoMode.tsx');
exports.default = function() {
return require(dependencyMap[5]).useStateFromStores([ChannelStore, SelectedChannelStore, MediaEngineStore,
VoiceStateStore, ApplicationStreamingStore], _fun73443);
};
exports.isVideoMode = closure;
}
function isVideoMode() { // fn#73441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:146, offset: 0x01d6cc48, size: 159 bytes, params: 1, frame: 15
var r1;
var r0;
const value = a0;
const value2 = a1;
const value3 = a2;
const value4 = a3;
const value5 = a4;
const r2 = value !== undefined ? value : ChannelStore;
const r6 = value2 !== undefined ? value2 : SelectedChannelStore;
const r4 = value3 !== undefined ? value3 : ApplicationStreamingStore;
const r5 = value4 !== undefined ? value4 : VoiceStateStore;
const r3 = value5 !== undefined ? value5 : MediaEngineStore;
const getChannel = r2.getChannel;
const getVoiceChannelId = r6.getVoiceChannelId;
const value6 = Reflect.apply(getChannel, r2, [Reflect.apply(getVoiceChannelId, r6, [])]) != null;
if (value6) {
r1 = r4.getAllActiveStreams().length > 0 || r5.hasVideo(value.id);
r1 = !r1 ? r3.isVideoEnabled() : r1;
r0 = r1;
} else {
r0 = value6;
}
return r0;
}
function _default_73442() { // fn#73442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:332, offset: 0x01d6cce7, size: 91 bytes, params: 1, frame: 14
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, SelectedChannelStore,
MediaEngineStore, VoiceStateStore, ApplicationStreamingStore], function() {
return isVideoMode(ChannelStore, SelectedChannelStore, ApplicationStreamingStore, VoiceStateStore,
MediaEngineStore);
});
}