decord/beta/source/modules/voice_calls/collectCallFeedback.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

78 lines
3.7 KiB
TypeScript

// Module ID: 13894
// Function ID: 13895
// Name: collectCallFeedback
// Dependencies: [9896, 2045, 1996, 4781, 2099, 1376, 9883, 4938, 9900, 9897, 577, 2]
// Exports: default
// Module 13894 (collectCallFeedback)
import DispatcherDefault from "Dispatcher" /* 577 */;
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 4938 */;
import VideoBackgroundStore from "VideoBackgroundStore" /* 9896 */;
import ChannelStore from "ChannelStore" /* 2045 */;
import MediaEngineStore from "MediaEngineStore" /* 1996 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4781 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2099 */;
import UserStore from "UserStore" /* 1376 */;
import AudioRouteStore from "AudioRouteStore" /* 9883 */;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/voice_calls/collectCallFeedback.tsx");
export default function collectCallFeedback(fn, arg1, arg2, videoEnabled) {
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const channel = ChannelStore.getChannel(voiceChannelId);
if (null == arg1) {
if (null != voiceChannelId) {
if (null != channel) {
const rTCConnection = RTCConnectionStore.getRTCConnection();
let voiceDurationStats;
if (rTCConnection != null) {
voiceDurationStats = rTCConnection.getVoiceDurationStats();
}
const obj = { channel_id: null, channel_type: null, guild_id: null, rtc_connection_id: null, duration: null, media_session_id: null };
({ id: obj4.channel_id, type: obj4.channel_type } = channel);
obj.guild_id = channel.getGuildId();
obj.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
obj.duration = RTCConnectionStore.getDuration();
obj.media_session_id = RTCConnectionStore.getMediaSessionId();
const guildId = obj2.getGuildId();
const merged = Object.assign(AppAnalyticsUtils.getVoiceStateMetadata(guildId, obj2.getChannelId(), videoEnabled));
let duration_muted_ms;
if (voiceDurationStats != null) {
duration_muted_ms = voiceDurationStats.duration_muted_ms;
}
if (duration_muted_ms == null) {
duration_muted_ms = null;
}
obj.duration_muted_ms = duration_muted_ms;
obj.output_audio_route_type = AudioRouteStore.getCurrentRouteType();
fn();
if (VideoBackgroundStore.hasUsedBackgroundInCall) {
const obj3 = {};
const merged1 = Object.assign(obj);
const lastUsedVideoBackgroundOption = tmp5(9900).getLastUsedVideoBackgroundOption(UserStore.getCurrentUser());
const videoDevices = MediaEngineStore.getVideoDevices();
const tmp22 = videoDevices[MediaEngineStore.getVideoDeviceId(MediaEngineStore)];
let name;
if (tmp22 != null) {
name = tmp22.name;
}
const obj7 = { video_device_name: name, video_hardware_scaling_enabled: MediaEngineStore.getHardwareEncoding(), video_effect_type: null, video_effect_detail: null };
const tmp5Result = tmp5(9900);
obj7.video_effect_type = tmp5(9897).getEffectAnalyticsType(lastUsedVideoBackgroundOption);
const tmp5Result3 = tmp5(9897);
obj7.video_effect_detail = tmp5(9897).getEffectDetailAnalyticsName(lastUsedVideoBackgroundOption);
const merged2 = Object.assign(obj7);
const tmp5Result4 = tmp5(9897);
const obj8 = { type: "VIDEO_BACKGROUND_SHOW_FEEDBACK", analyticsData: obj3 };
DispatcherDefault.dispatch(obj8);
} else {
const obj9 = { type: "VOICE_CHANNEL_SHOW_FEEDBACK", analyticsData: obj };
DispatcherDefault.dispatch(obj9);
}
}
}
}
fn();
};