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

79 lines
4.5 KiB
TypeScript

/* Metro module 12366; source: modules/voice_calls/collectCallFeedback.tsx; dependencies: [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694, 2] */
function _fun94269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12552:6, offset: 0x021125a2, size: 214 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const videoBackgroundStore = importDefault(8905) /* metro dependency 8905: VideoBackgroundStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const audioRouteStoreNative = importDefault(9229) /* metro dependency 9229: AudioRouteStoreNative */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/collectCallFeedback.tsx');
exports.default = collectCallFeedback;
}
function collectCallFeedback(a0, a1, a2, a3) { // fn#94270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12552:254, offset: 0x02112678, size: 625 bytes, params: 5, frame: 21
var r6;
var duration_muted_ms;
var rTCConnection;
var value6;
var object2;
var moduleValue;
var object4;
var moduleValue2;
var value11;
var property;
var value;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const channel = ChannelStore.getChannel(voiceChannelId);
const value4 = null;
if (value4 != a1) {
a0();
} else if (value4 == voiceChannelId) {
a0();
} else if (value4 != channel) {
rTCConnection = RTCConnectionStore.getRTCConnection();
value6 = undefined;
r6 = value4 == rTCConnection ? value6 : rTCConnection.getVoiceDurationStats();
object2 = {};
object2.channel_id = channel.id;
object2.channel_type = channel.type;
object2.guild_id = channel.getGuildId();
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
object2.duration = RTCConnectionStore.getDuration();
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, moduleValue.getVoiceStateMetadata(RTCConnectionStore.getGuildId(),
RTCConnectionStore.getChannelId(), a3), undefined);
duration_muted_ms = value4 == r6 ? value6 : r6.duration_muted_ms;
r6 = value4 != duration_muted_ms ? duration_muted_ms : value4;
object2['duration_muted_ms'] = r6;
object2['output_audio_route_type'] = AudioRouteStoreNative.getCurrentRouteType();
a0();
if (VideoBackgroundStore.hasUsedBackgroundInCall) {
object4 = {};
copyDataProperties(object4, object2, undefined);
moduleValue2 = require(8909) /* metro dependency 8909: LastUsedVideoBackgroundOption */;
value11 = moduleValue2.getLastUsedVideoBackgroundOption(UserStore.getCurrentUser());
object2 = {};
property = MediaEngineStore.getVideoDevices()[MediaEngineStore.getVideoDeviceId()];
object2.video_device_name = value4 == property ? value6 : property.name;
object2.video_hardware_scaling_enabled = MediaEngineStore.getHardwareEncoding();
object2.video_effect_type = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectAnalyticsType(value11);
object2.video_effect_detail = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectDetailAnalyticsName(value11);
copyDataProperties(object4, object2, undefined);
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIDEO_BACKGROUND_SHOW_FEEDBACK',
analyticsData: object4});
} else {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'VOICE_CHANNEL_SHOW_FEEDBACK', analyticsData: object2});
}
} else {
a0();
}
}