/* Metro module 12366; source: modules/voice_calls/collectCallFeedback.tsx; dependencies: [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694, 2] */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */ import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */ import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */ import VideoBackgroundStore from '../video_backgrounds/VideoBackgroundStore.tsx'; /* Metro dependency 8905 */ import AudioRouteStoreNative from './AudioRouteStore.native.tsx'; /* Metro dependency 9229 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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}); (FileImportTrackerModule).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 rtcConnectionStoreBinding; var rTCConnection; var value6; var object; var moduleValue; var object3; var moduleValue2; var getLastUsedVideoBackgroundOption; var userStoreBinding; var value11; var mediaEngineStoreBinding; 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(); object = {}; object.channel_id = channel.id; object.channel_type = channel.type; object.guild_id = channel.getGuildId(); rtcConnectionStoreBinding = RTCConnectionStore; object.rtc_connection_id = rtcConnectionStoreBinding.getRTCConnectionId(); object.duration = rtcConnectionStoreBinding.getDuration(); object.media_session_id = rtcConnectionStoreBinding.getMediaSessionId(); moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */; copyDataProperties(object, moduleValue.getVoiceStateMetadata(rtcConnectionStoreBinding.getGuildId(), rtcConnectionStoreBinding.getChannelId(), a3), undefined); duration_muted_ms = value4 == r6 ? value6 : r6.duration_muted_ms; r6 = value4 != duration_muted_ms ? duration_muted_ms : value4; object['duration_muted_ms'] = r6; object['output_audio_route_type'] = AudioRouteStoreNative.getCurrentRouteType(); a0(); if (VideoBackgroundStore.hasUsedBackgroundInCall) { object3 = {}; copyDataProperties(object3, object, undefined); moduleValue2 = require(8909) /* metro dependency 8909: LastUsedVideoBackgroundOption */; getLastUsedVideoBackgroundOption = moduleValue2.getLastUsedVideoBackgroundOption; userStoreBinding = UserStore; value11 = Reflect.apply(getLastUsedVideoBackgroundOption, moduleValue2, [userStoreBinding.getCurrentUser()]); object = {}; mediaEngineStoreBinding = MediaEngineStore; property = mediaEngineStoreBinding.getVideoDevices()[mediaEngineStoreBinding.getVideoDeviceId()]; object.video_device_name = value4 == property ? value6 : property.name; object.video_hardware_scaling_enabled = MediaEngineStore.getHardwareEncoding(); object.video_effect_type = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectAnalyticsType(value11); object.video_effect_detail = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getEffectDetailAnalyticsName(value11); copyDataProperties(object3, object, undefined); (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIDEO_BACKGROUND_SHOW_FEEDBACK', analyticsData: object3}); } else { value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'VOICE_CHANNEL_SHOW_FEEDBACK', analyticsData: object}); } } else { a0(); } } } global.__d(_fun94269, 12366, [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694, 2]) /* metro module 12366, dependencies: [8905, 1379, 4259, 4294, 1934, 1878, 9229, 4863, 8909, 8906, 694, 2] */;