decord/source/modules/voice_calls/collectCallFeedback.tsx

87 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13114
// Function ID: 13115
2026-07-20 16:05:17 +00:00
// Name: collectCallFeedback
2026-08-24 06:08:38 +00:00
// Dependencies: [9699, 1391, 4501, 4544, 1980, 1922, 9687, 5047, 9703, 9700, 709, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 13114 (collectCallFeedback)
import dispatcherDefault from "dispatcher" /* 709 */;
import collectGuildAnalyticsMetadata from "collectGuildAnalyticsMetadata" /* 5047 */;
import closure_3 from "handleSyncedStoresUpdate" /* 9699 */;
import closure_4 from "ensureGuildLoaded" /* 1391 */;
import closure_5 from "_detectH265HardwareDecode" /* 4501 */;
import closure_6 from "createRTCConnection" /* 4544 */;
import closure_7 from "handleConnectionOpen" /* 1980 */;
import closure_8 from "mergeGuildAvatar" /* 1922 */;
import closure_9 from "handleAudioRouteChanged" /* 9687 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/voice_calls/collectCallFeedback.tsx");
2026-07-20 16:05:17 +00:00
export default function collectCallFeedback(arg0, arg1, arg2, videoEnabled) {
2026-07-23 10:11:24 +00:00
voiceChannelId = voiceChannelId.getVoiceChannelId();
channel = channel.getChannel(voiceChannelId);
2026-07-20 16:05:17 +00:00
if (null == arg1) {
if (null != voiceChannelId) {
if (null != channel) {
2026-08-24 06:08:38 +00:00
obj1 = rTCConnection;
2026-07-29 08:29:29 +00:00
rTCConnection = rTCConnection.getRTCConnection();
2026-07-20 16:05:17 +00:00
let voiceDurationStats;
2026-07-29 08:29:29 +00:00
if (rTCConnection != null) {
2026-07-20 16:05:17 +00:00
voiceDurationStats = rTCConnection.getVoiceDurationStats();
}
2026-07-29 08:29:29 +00:00
let obj = { channel_id: null, channel_type: null, guild_id: null, rtc_connection_id: null, duration: null, media_session_id: null };
({ id: obj4[0], type: obj4[1] } = channel);
obj[2] = channel.getGuildId();
obj[3] = obj1.getRTCConnectionId();
obj[4] = obj1.getDuration();
obj[5] = obj1.getMediaSessionId();
const guildId = obj1.getGuildId();
2026-08-24 06:08:38 +00:00
const merged = Object.assign(collectGuildAnalyticsMetadata.getVoiceStateMetadata(guildId, obj1.getChannelId(), videoEnabled));
2026-07-20 16:05:17 +00:00
let duration_muted_ms;
2026-07-29 08:29:29 +00:00
if (voiceDurationStats != null) {
2026-07-20 16:05:17 +00:00
duration_muted_ms = voiceDurationStats.duration_muted_ms;
}
2026-07-29 08:29:29 +00:00
if (duration_muted_ms == null) {
duration_muted_ms = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj.duration_muted_ms = duration_muted_ms;
obj.output_audio_route_type = currentRouteType.getCurrentRouteType();
2026-07-20 16:05:17 +00:00
arg0();
if (obj.hasUsedBackgroundInCall) {
obj = {};
const merged1 = Object.assign(obj);
2026-08-24 06:08:38 +00:00
let tmp5Result = tmp5(9703);
2026-07-29 08:29:29 +00:00
const lastUsedVideoBackgroundOption = tmp5Result.getLastUsedVideoBackgroundOption(currentUser.getCurrentUser());
2026-07-20 16:05:17 +00:00
const videoDevices = store.getVideoDevices();
2026-07-29 08:29:29 +00:00
const tmp22 = videoDevices[store.getVideoDeviceId(store)];
2026-07-20 16:05:17 +00:00
let name;
2026-07-29 08:29:29 +00:00
if (tmp22 != null) {
name = tmp22.name;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1 = { video_device_name: null, video_hardware_scaling_enabled: null, video_effect_type: null, video_effect_detail: null };
obj1[0] = name;
obj1[1] = store.getHardwareEncoding();
2026-08-24 06:08:38 +00:00
tmp5Result = tmp5(9700);
2026-07-29 08:29:29 +00:00
obj1[2] = tmp5Result.getEffectAnalyticsType(lastUsedVideoBackgroundOption);
2026-08-24 06:08:38 +00:00
obj1[3] = tmp5(9700).getEffectDetailAnalyticsName(lastUsedVideoBackgroundOption);
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(obj1);
2026-07-29 08:29:29 +00:00
const obj10 = store;
2026-08-24 06:08:38 +00:00
const tmp5Result1 = tmp5(9700);
2026-07-29 08:29:29 +00:00
const obj2 = { type: "VIDEO_BACKGROUND_SHOW_FEEDBACK", analyticsData: null };
obj2[1] = obj;
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj2);
const obj14 = dispatcherDefault;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj3 = { type: "VOICE_CHANNEL_SHOW_FEEDBACK", analyticsData: null };
obj3[1] = obj;
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj3);
const obj6 = dispatcherDefault;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const obj5 = collectGuildAnalyticsMetadata;
2026-07-20 16:05:17 +00:00
}
}
}
arg0();
};