/* Metro module 8899; source: actions/AudioActionCreators.tsx; dependencies: [5, 4293, 1379, 4259, 4294, 1934, 1878, 661, 8900, 4291, 3, 683, 6949, 694, 8901, 8903, 8904, 8912, 2] */ import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */ import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */ 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 CertifiedDeviceStore from '../stores/CertifiedDeviceStore.tsx'; /* Metro dependency 4293 */ import RTCConnectionStore from '../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */ import * as ConstantsModule2 from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */ import * as ConstantsModule3 from '../modules/sound_playback/Constants.tsx'; /* Metro dependency 8900 */ import * as AudioSettingsUtilsModule from '../modules/user_settings/voice/AudioSettingsUtils.tsx'; /* Metro dependency 8901 */ import * as ApplyBackgroundOptionModule from '../modules/video_backgrounds/applyBackgroundOption.tsx'; /* Metro dependency 8904 */ function _fun69366(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6, offset: 0x01c71887, size: 1030 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const env0_10 = value.InputModes; const env0_11 = value.AnalyticEvents; (ConstantsModule3).SoundOutputChannel; value = importDefault(3) /* metro dependency 3: Logger */; value = new value('AudioActionCreators'); value.enableNativeLogger(true); const env0_14 = (importDefault(6949) /* metro dependency 6949 */)(function(a0, a1, a2) { var defaultImport = importDefault(dependencyMap[11]); var USER_VOLUME_SETTING_UPDATED = AnalyticEvents.USER_VOLUME_SETTING_UPDATED; var object = {target_user_id: a0, context: a1, volume: a2}; var rtcConnectionStoreBinding = RTCConnectionStore; object.media_session_id = rtcConnectionStoreBinding.getMediaSessionId(); object.rtc_connection_id = rtcConnectionStoreBinding.getRTCConnectionId(); defaultImport.track(USER_VOLUME_SETTING_UPDATED, object); }, 300); object = {isNotSupported: function() { return false; }, enable: function() { var Promise = global.Promise; return Promise.resolve(true); }, trackToggleSelfMute: function() { }, trackToggleSelfDeaf: function() { }}; const env0_15 = object.isNotSupported; const env0_16 = object.trackToggleSelfMute; const env0_17 = object.trackToggleSelfDeaf; const object2 = {}; object2.enable = object.enable; object2.toggleSelfMute = toggleSelfMute; object2.setSelfMute = setSelfMute; object2.setTemporarySelfMute = setTemporarySelfMute; object2.toggleSelfDeaf = toggleSelfDeaf; object2.toggleLocalMute = toggleLocalMute; object2.toggleLocalSoundboardMute = toggleLocalSoundboardMute; object2.setDisableLocalVideo = setDisableLocalVideo; object2.setLocalVolume = setLocalVolume; object2.setAudioMixerSettings = setAudioMixerSettings; object2.setLocalPan = setLocalPan; object2.setMode = setMode; object2.setBypassSystemInputProcessing = setBypassSystemInputProcessing; object2.setInputVolume = setInputVolume; object2.setOutputVolume = setOutputVolume; object2.setInputDevice = setInputDevice_69388; object2.setOutputDevice = setOutputDevice_69389; object2.setVideoDevice = setVideoDevice; object2.setActiveInputProfile = setActiveInputProfile; object2.setEchoCancellation = setEchoCancellation; object2.setSidechainCompression = setSidechainCompression; object2.setSidechainCompressionStrength = setSidechainCompressionStrength; object2.setLoopback = setLoopback_69395; object2.setNoiseSuppression = setNoiseSuppression; object2.setNoiseCancellation = setNoiseCancellation_69397; object2.setAutomaticGainControl = setAutomaticGainControl_69398; object2.setAttenuation = setAttenuation; object2.setQoS = setQoS; object2.reset = reset_69401; object2.setSilenceWarning = setSilenceWarning; object2.setDebugLogging = setDebugLogging; object2.setVideoHook = setVideoHook; object2.setExperimentalSoundshare = setExperimentalSoundshare; object2.setUseSystemScreensharePicker = setUseSystemScreensharePicker; object2.setAudioSubsystem = setAudioSubsystem_69409; object2.setVideoEnabled = setVideoEnabled; object2.setGoLiveSource = setGoLiveSource; object2.setAecDump = setAecDump; object2.interact = interact; object2.setEnableHardwareMuteNotice = setEnableHardwareMuteNotice; object2.setKrispSuppressionLevel = setKrispSuppressionLevel; object2.setKrispModelOverride = function(a0) { if (!isNotSupported()) { importDefault(dependencyMap[13]).dispatch({type: 'AUDIO_SET_KRISP_MODEL_OVERRIDE', model: a0}); if (MediaEngineStore.getNoiseCancellation()) { this.setNoiseCancellation(false); this.setNoiseCancellation(true); } } }; object2.setNoiseCancellationEnableStats = function(a0) { isNotSupported(); }; object2.setOpenH264Enabled = setOpenH264Enabled_69420; object2.resetMediaEngineSettings = resetMediaEngineSettings; (FileImportTrackerModule).fileFinishedImporting('actions/AudioActionCreators.tsx'); exports.default = object2; function getInputDeviceName() { // fn#69367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:312, offset: 0x01c71c8d, size: 55 bytes, params: 1, frame: 10 const inputDevices = MediaEngineStore.getInputDevices(); mediaEngineStoreBinding = MediaEngineStore; const getInputDeviceId = mediaEngineStoreBinding.getInputDeviceId; const property = inputDevices[Reflect.apply(getInputDeviceId, mediaEngineStoreBinding, [])]; return property != null ? property.name : ''; } function trackDeviceChanged(a0, a1, a2, a3) { // fn#69368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:415, offset: 0x01c71cc4, size: 330 bytes, params: 5, frame: 30 var r8; var object; var voiceChannelId; var value4; var property; var property2; var audioSubsystem; var audioLayer; var defaultImport; var track; var MEDIA_DEVICE_CHANGED; var certifiedDeviceStoreBinding; var value10; const value = a4; const value2 = undefined; const r2 = value !== value2 ? value : {}; if (a1 !== a2) { voiceChannelId = SelectedChannelStore.getVoiceChannelId(); value4 = null; r8 = value4 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value4; property = a0[a1]; property2 = a0[a2]; audioSubsystem = MediaEngineStore.getMediaEngine().getAudioSubsystem(); audioLayer = MediaEngineStore.getMediaEngine().getAudioLayer(); defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; MEDIA_DEVICE_CHANGED = AnalyticEvents.MEDIA_DEVICE_CHANGED; object = {}; certifiedDeviceStoreBinding = CertifiedDeviceStore; value10 = ''; object.device_from_name = certifiedDeviceStoreBinding.getCertifiedDeviceName(a1, value4 != property ? property.name : value10); object.device_to_name = CertifiedDeviceStore.getCertifiedDeviceName(a2, value4 != property2 ? property2.name : value10); object.device_type = a3; object.device_is_certified = CertifiedDeviceStore.isCertified(a2); object.location = r2.location; object.location_stack = r2.analyticsLocations; object.voice_channel_type = value4 == r8 ? value2 : r8.type; object.audio_subsystem = audioSubsystem; object.audio_layer = audioLayer; Reflect.apply(track, defaultImport, [MEDIA_DEVICE_CHANGED, object]); } return value2; } function toggleSelfMute() { // fn#69374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:1381, offset: 0x01c71e79, size: 297 bytes, params: 1, frame: 18 var r4; var mediaEngineStoreBinding; var currentUser; let value = a0; let r0 = value !== undefined ? value : {}; const context = r0.context; const r6 = context !== undefined ? context : MediaEngineContextTypes.DEFAULT; let syncRemote = r0.syncRemote; syncRemote = syncRemote === undefined || syncRemote; let usedKeybind = r0.usedKeybind; usedKeybind = !(usedKeybind === undefined) && usedKeybind; let playSoundEffect = r0.playSoundEffect; playSoundEffect = playSoundEffect === undefined || playSoundEffect; if (isNotSupported()) { r0 = global.Promise.resolve(); } else { trackToggleSelfMute({usedKeybind: usedKeybind, location: r0.location}); r4 = playSoundEffect && !MediaEngineStore.hasActiveCallKitCall(); currentUser = UserStore.getCurrentUser(); r0 = currentUser != null && currentUser.isStaff(); if (r0) { env0_13.info('Toggling self mute'); } mediaEngineStoreBinding = MediaEngineStore; if (mediaEngineStoreBinding.isEnabled()) { value = importDefault(694) /* metro dependency 694: Dispatcher */; value = value.dispatch({type: 'AUDIO_TOGGLE_SELF_MUTE', context: r6, syncRemote: syncRemote, playSoundEffect: r4}); r0 = value; } else { r0 = this.enable(true); } } return r0; } function setSelfMute(a0, a1) { // fn#69375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:1780, offset: 0x01c71fa2, size: 169 bytes, params: 3, frame: 16 var currentUser; let value = a2; let r4 = !(value !== undefined) || value; if (!isNotSupported()) { r4 = r4 && !MediaEngineStore.hasActiveCallKitCall(); currentUser = UserStore.getCurrentUser(); if (currentUser != null && currentUser.isStaff()) { env0_13.info('Setting self mute', a1); } value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_SELF_MUTE', context: a0, mute: a1, playSoundEffect: r4}); } } function setTemporarySelfMute(a0) { // fn#69376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2003, offset: 0x01c7204b, size: 125 bytes, params: 2, frame: 15 var currentUser; if (!isNotSupported()) { currentUser = UserStore.getCurrentUser(); if (currentUser != null && currentUser.isStaff()) { env0_13.info('Setting temporary self mute', a0); } (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_TEMPORARY_SELF_MUTE', mute: a0}); } } function toggleSelfDeaf() { // fn#69377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2189, offset: 0x01c720c8, size: 147 bytes, params: 1, frame: 16 const value = a0; const r1 = value !== undefined ? value : {}; const context = r1.context; const r5 = context !== undefined ? context : MediaEngineContextTypes.DEFAULT; let syncRemote = r1.syncRemote; syncRemote = syncRemote === undefined || syncRemote; let usedKeybind = r1.usedKeybind; usedKeybind = !(usedKeybind === undefined) && usedKeybind; if (!isNotSupported()) { trackToggleSelfDeaf({usedKeybind: usedKeybind, location: r1.location}); (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_TOGGLE_SELF_DEAF', context: r5, syncRemote: syncRemote}); } } function toggleLocalMute(a0) { // fn#69378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2386, offset: 0x01c7215b, size: 89 bytes, params: 2, frame: 14 let value = a1; if (!isNotSupported()) { value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_TOGGLE_LOCAL_MUTE', context: value !== undefined ? value : MediaEngineContextTypes.DEFAULT, userId: a0}); } } function toggleLocalSoundboardMute(a0) { // fn#69379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2494, offset: 0x01c721b4, size: 78 bytes, params: 2, frame: 14 let value = a1; const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_TOGGLE_LOCAL_SOUNDBOARD_MUTE', context: r4, userId: a0}); } function setDisableLocalVideo(a0, a1) { // fn#69380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2618, offset: 0x01c72202, size: 125 bytes, params: 3, frame: 16 let value = a2; const value2 = a3; const value3 = a4; if (!isNotSupported()) { value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_LOCAL_VIDEO_DISABLED', context: value !== undefined ? value : MediaEngineContextTypes.DEFAULT, userId: a0, videoToggleState: a1, persist: !(value2 !== undefined) || value2, isAutomatic: value3 !== undefined ? value3 : false}); } } function setLocalVolume(a0, a1) { // fn#69381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2793, offset: 0x01c7227f, size: 125 bytes, params: 3, frame: 19 const value = a2; const r3 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT; const value2 = (AudioSettingsUtilsModule).snapVolumeToDefault(a1, r3); const defaultImport = Dispatcher; defaultImport.dispatch({type: 'AUDIO_SET_LOCAL_VOLUME', context: r3, userId: a0, volume: value2}); env0_14(a0, r3, value2); } function setAudioMixerSettings(a0) { // fn#69382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:2954, offset: 0x01c722fc, size: 79 bytes, params: 2, frame: 14 let value = a1; const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_AUDIO_MIXER_SETTINGS', context: r4, settings: a0}); } function setLocalPan(a0, a1, a2) { // fn#69383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:3072, offset: 0x01c7234b, size: 94 bytes, params: 4, frame: 14 let value = a3; const r4 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_LOCAL_PAN', context: r4, userId: a0, left: a1, right: a2}); } function setMode(a0) { // fn#69384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:3186, offset: 0x01c723a9, size: 617 bytes, params: 2, frame: 25 var r14; var r9; var object; var mode; var modeOptions; var defaultImport; var dispatch; var object2; var audioSubsystem; var audioLayer; var voiceChannelId; var value12; var inputDeviceName; var defaultImport2; var track; var VOICE_ACTIVITY_THRESHOLD_CHANGED; var threshold; var autoThreshold; var audioSubsystem2; var audioLayer2; var voiceChannelId2; var value20; var inputDeviceName2; var defaultImport3; const value = a1; const value2 = a2; const value3 = a3; const value4 = undefined; const r6 = value !== value4 ? value : {}; const r8 = value2 !== value4 ? value2 : MediaEngineContextTypes.DEFAULT; const analyticsLocations = (value3 !== value4 ? value3 : {}).analyticsLocations; if (!isNotSupported()) { mode = MediaEngineStore.getMode(); modeOptions = MediaEngineStore.getModeOptions(r8); defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */; dispatch = defaultImport.dispatch; object = {type: 'AUDIO_SET_MODE', context: r8, mode: a0}; object2 = {}; copyDataProperties(object2, modeOptions, undefined); copyDataProperties(object2, r6, undefined); object.options = object2; Reflect.apply(dispatch, defaultImport, [object]); if (a0 !== mode) { audioSubsystem2 = MediaEngineStore.getMediaEngine().getAudioSubsystem(); audioLayer2 = MediaEngineStore.getMediaEngine().getAudioLayer(); voiceChannelId2 = SelectedChannelStore.getVoiceChannelId(); value20 = null; r9 = value20 != voiceChannelId2 ? ChannelStore.getChannel(voiceChannelId2) : value20; inputDeviceName2 = getInputDeviceName(); defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport3.track(AnalyticEvents.VOICE_ACTIVATION_MODE_CHANGED, {mode: a0, location_stack: analyticsLocations, voice_channel_type: value20 == r9 ? value4 : r9.type, input_device_name: inputDeviceName2, audio_subsystem: audioSubsystem2, audio_layer: audioLayer2}); } else if (a0 === InputModes.VOICE_ACTIVITY) { if (modeOptions !== r6) { audioSubsystem = MediaEngineStore.getMediaEngine().getAudioSubsystem(); audioLayer = MediaEngineStore.getMediaEngine().getAudioLayer(); voiceChannelId = SelectedChannelStore.getVoiceChannelId(); value12 = null; r14 = value12 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value12; inputDeviceName = getInputDeviceName(); defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport2.track; VOICE_ACTIVITY_THRESHOLD_CHANGED = AnalyticEvents.VOICE_ACTIVITY_THRESHOLD_CHANGED; object = {location_stack: analyticsLocations}; object.voice_channel_type = value12 == r14 ? value4 : r14.type; object.input_device_name = inputDeviceName; object.audio_subsystem = audioSubsystem; object.audio_layer = audioLayer; threshold = modeOptions.threshold; object.old_threshold = threshold; threshold = r6.threshold; object.new_threshold = threshold; autoThreshold = modeOptions.autoThreshold; object.old_auto_threshold = autoThreshold; autoThreshold = r6.autoThreshold; object.new_auto_threshold = autoThreshold; Reflect.apply(track, defaultImport2, [VOICE_ACTIVITY_THRESHOLD_CHANGED, object]); } } } return value4; } function setBypassSystemInputProcessing(a0, a1) { // fn#69385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4191, offset: 0x01c72612, size: 75 bytes, params: 3, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_BYPASS_SYSTEM_INPUT_PROCESSING', bypassEnabled: a0, location: a1}); } } function setInputVolume(a0) { // fn#69386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4329, offset: 0x01c7265d, size: 197 bytes, params: 2, frame: 18 var r6; var voiceChannelId; var value4; var defaultImport2; const value = a1; const value2 = undefined; if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_INPUT_VOLUME', volume: a0}); voiceChannelId = SelectedChannelStore.getVoiceChannelId(); value4 = null; r6 = value4 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value4; defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport2.track(AnalyticEvents.MEDIA_INPUT_VOLUME_CHANGED, {volume: a0, location_stack: (value !== value2 ? value : {}).analyticsLocations, voice_channel_type: value4 == r6 ? value2 : r6.type}); } return value2; } function setOutputVolume(a0) { // fn#69387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4617, offset: 0x01c72722, size: 195 bytes, params: 2, frame: 18 var r6; var voiceChannelId; var value4; var defaultImport2; const value = a1; const value2 = undefined; if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_OUTPUT_VOLUME', volume: a0}); voiceChannelId = SelectedChannelStore.getVoiceChannelId(); value4 = null; r6 = value4 != voiceChannelId ? ChannelStore.getChannel(voiceChannelId) : value4; defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport2.track(AnalyticEvents.MEDIA_OUTPUT_VOLUME_CHANGED, {volume: a0, location_stack: (value !== value2 ? value : {}).analyticsLocations, voice_channel_type: value4 == r6 ? value2 : r6.type}); } return value2; } function setInputDevice_69388(a0) { // fn#69388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:4908, offset: 0x01c727e5, size: 167 bytes, params: 2, frame: 21 var inputDeviceId; let value = a1; const r1 = value !== undefined ? value : {}; const location = r1.location; const analyticsLocations = r1.analyticsLocations; if (!isNotSupported()) { inputDeviceId = MediaEngineStore.getInputDeviceId(); if (location != null) { trackDeviceChanged(MediaEngineStore.getInputDevices(), inputDeviceId, a0, 'Audio Input', {location: location, analyticsLocations: analyticsLocations}); } else if (analyticsLocations != null) { trackDeviceChanged(MediaEngineStore.getInputDevices(), inputDeviceId, a0, 'Audio Input', {location: location, analyticsLocations: analyticsLocations}); } value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_INPUT_DEVICE', id: a0, oldId: inputDeviceId}); } } function setOutputDevice_69389(a0) { // fn#69389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5177, offset: 0x01c7288c, size: 167 bytes, params: 2, frame: 21 var outputDeviceId; let value = a1; const r1 = value !== undefined ? value : {}; const location = r1.location; const analyticsLocations = r1.analyticsLocations; if (!isNotSupported()) { outputDeviceId = MediaEngineStore.getOutputDeviceId(); if (location != null) { trackDeviceChanged(MediaEngineStore.getOutputDevices(), outputDeviceId, a0, 'Audio Output', {location: location, analyticsLocations: analyticsLocations}); } else if (analyticsLocations != null) { trackDeviceChanged(MediaEngineStore.getOutputDevices(), outputDeviceId, a0, 'Audio Output', {location: location, analyticsLocations: analyticsLocations}); } value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_OUTPUT_DEVICE', id: a0, oldId: outputDeviceId}); } } function setVideoDevice(a0) { // fn#69390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5451, offset: 0x01c72933, size: 162 bytes, params: 2, frame: 21 var videoDeviceId; let value = a1; const r1 = value !== undefined ? value : {}; const location = r1.location; const analyticsLocations = r1.analyticsLocations; if (!isNotSupported()) { videoDeviceId = MediaEngineStore.getVideoDeviceId(); if (location != null) { trackDeviceChanged(MediaEngineStore.getVideoDevices(), videoDeviceId, a0, 'Video', {location: location, analyticsLocations: analyticsLocations}); } else if (analyticsLocations != null) { trackDeviceChanged(MediaEngineStore.getVideoDevices(), videoDeviceId, a0, 'Video', {location: location, analyticsLocations: analyticsLocations}); } value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'MEDIA_ENGINE_SET_VIDEO_DEVICE', id: a0, oldId: videoDeviceId}); } } function setActiveInputProfile(a0) { // fn#69391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5721, offset: 0x01c729d5, size: 152 bytes, params: 2, frame: 19 const value = a1; const value2 = undefined; if (!isNotSupported()) { (importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('active_input_profile', a0, MediaEngineStore.getActiveInputProfile() ?? value2, (value !== value2 ? value : {}).analyticsLocations); (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_ACTIVE_INPUT_PROFILE', inputProfile: a0}); } return value2; } function setEchoCancellation(a0, a1) { // fn#69392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:5942, offset: 0x01c72a6d, size: 74 bytes, params: 3, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_ECHO_CANCELLATION', enabled: a0, location: a1}); } } function setSidechainCompression(a0) { // fn#69393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6050, offset: 0x01c72ab7, size: 126 bytes, params: 2, frame: 19 var defaultImport; let value = a1; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getSidechainCompression(); defaultImport('stream_attenuation_enabled', a0, value, (value !== undefined ? value : {}).analyticsLocations); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_SIDECHAIN_COMPRESSION', enabled: a0}); } } function setSidechainCompressionStrength(a0) { // fn#69394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6252, offset: 0x01c72b35, size: 129 bytes, params: 2, frame: 19 var defaultImport; let value = a1; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getSidechainCompressionStrength(); defaultImport('stream_attenuation_strength', a0, value, (value !== undefined ? value : {}).analyticsLocations); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_SIDECHAIN_COMPRESSION_STRENGTH', strength: a0}); } } function setLoopback_69395(a0, a1) { // fn#69395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6481, offset: 0x01c72bb6, size: 75 bytes, params: 3, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_LOOPBACK', loopbackReason: a0, enabled: a1}); } } function setNoiseSuppression(a0, a1) { // fn#69396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6578, offset: 0x01c72c01, size: 74 bytes, params: 3, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_NOISE_SUPPRESSION', enabled: a0, location: a1}); } } function setNoiseCancellation_69397(a0, a1) { // fn#69397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6686, offset: 0x01c72c4b, size: 114 bytes, params: 3, frame: 18 var value; if (!isNotSupported()) { value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_NOISE_CANCELLATION', enabled: a0, location: a1}); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_NOISE_SUPPRESSION', enabled: !a0, location: a1}); } } function setAutomaticGainControl_69398(a0, a1) { // fn#69398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6876, offset: 0x01c72cbd, size: 74 bytes, params: 3, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_AUTOMATIC_GAIN_CONTROL', enabled: a0, location: a1}); } } function setAttenuation(a0, a1, a2) { // fn#69399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:6993, offset: 0x01c72d07, size: 250 bytes, params: 4, frame: 21 var attenuation; var attenuateWhileSpeakingSelf; var attenuateWhileSpeakingOthers; if (!isNotSupported()) { attenuation = MediaEngineStore.getAttenuation(); attenuateWhileSpeakingSelf = MediaEngineStore.getAttenuateWhileSpeakingSelf(); attenuateWhileSpeakingOthers = MediaEngineStore.getAttenuateWhileSpeakingOthers(); if (attenuation !== a0) { (importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('global_attenuation_strength', a0, attenuation); } else if (attenuateWhileSpeakingSelf !== a1) { (importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('global_attenuation_for_self_speak_enabled', a1, attenuateWhileSpeakingSelf); } else if (attenuateWhileSpeakingOthers !== a2) { (importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */)('global_attenuation_for_other_speak_enabled', a2, attenuateWhileSpeakingOthers); } (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_ATTENUATION', attenuation: a0, attenuateWhileSpeakingSelf: a1, attenuateWhileSpeakingOthers: a2}); } } function setQoS(a0) { // fn#69400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7432, offset: 0x01c72e01, size: 106 bytes, params: 2, frame: 17 var defaultImport; var value; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getQoS(); defaultImport('quality_of_service_packets_enabled', a0, value); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_QOS', enabled: a0}); } } function reset_69401() { // fn#69401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7562, offset: 0x01c72e6b, size: 60 bytes, params: 1, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_RESET'}); } } function setSilenceWarning(a0) { // fn#69402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7616, offset: 0x01c72ea7, size: 106 bytes, params: 2, frame: 17 var defaultImport; var value; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getEnableSilenceWarning(); defaultImport('silence_warning_enabled', a0, value); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'AUDIO_SET_DISPLAY_SILENCE_WARNING', enabled: a0}); } } function setDebugLogging(a0) { // fn#69403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7799, offset: 0x01c72f11, size: 36 bytes, params: 2, frame: 11 const env0_0 = a0; return Module00005(_fun69405)(); function* _fun69405() { // fn#69405, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7805, offset: 0x01c72f40, size: 151 bytes, params: 1, frame: 18 if (true) { value = environment.__proto__.__proto__; if (!env2_15()) { var binding = env2_1; var value3 = binding(env2_2[15]); binding = env2_6; yield value3('debug_logging_enabled', require, binding.getDebugLogging()); if (false) { return undefined; } binding = env2_1; binding(env2_2[13]).dispatch({type: 'AUDIO_SET_DEBUG_LOGGING', enabled: require}); } } } } function setVideoHook(a0) { // fn#69406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:7953, offset: 0x01c72fd7, size: 108 bytes, params: 2, frame: 17 var defaultImport; var value; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getVideoHook(); defaultImport('video_hook_enabled', a0, value); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'MEDIA_ENGINE_SET_VIDEO_HOOK', enabled: a0}); } } function setExperimentalSoundshare(a0) { // fn#69407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8093, offset: 0x01c73043, size: 106 bytes, params: 2, frame: 17 var defaultImport; var value; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getExperimentalSoundshare(); defaultImport('experimental_soundshare_enabled', a0, value); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'MEDIA_ENGINE_SET_EXPERIMENTAL_SOUNDSHARE', enabled: a0}); } } function setUseSystemScreensharePicker(a0) { // fn#69408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8285, offset: 0x01c730ad, size: 108 bytes, params: 2, frame: 17 var defaultImport; var value; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getUseSystemScreensharePicker(); defaultImport('system_screenshare_picker_enabled', a0, value); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'MEDIA_ENGINE_SET_USE_SYSTEM_SCREENSHARE_PICKER', enabled: a0}); } } function setAudioSubsystem_69409(a0) { // fn#69409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8511, offset: 0x01c73119, size: 36 bytes, params: 2, frame: 11 const env0_0 = a0; return Module00005(_fun69411)(); function* _fun69411() { // fn#69411, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8517, offset: 0x01c73148, size: 150 bytes, params: 1, frame: 18 if (true) { value = environment.__proto__.__proto__; if (!env2_15()) { var binding = env2_1; var value3 = binding(env2_2[15]); binding = env2_6; yield value3('audio_subsystem', require, binding.getAudioSubsystem()); if (false) { return undefined; } binding = env2_1; binding(env2_2[13]).dispatch({type: 'AUDIO_SET_SUBSYSTEM', subsystem: require}); } } } } function setVideoEnabled(a0) { // fn#69412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8659, offset: 0x01c731de, size: 82 bytes, params: 2, frame: 13 (ApplyBackgroundOptionModule).applyInitialVideoBackgroundOption(); (Dispatcher).dispatch({type: 'MEDIA_ENGINE_SET_VIDEO_ENABLED', enabled: a0}); } function setGoLiveSource(a0) { // fn#69413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:8793, offset: 0x01c73230, size: 181 bytes, params: 2, frame: 21 var moduleValue; var trackStreamSettingsUpdate; var preset; var resolution; var frameRate; var desktopSettings; const value = undefined; let qualityOptions = a0 == null ? value : a0.qualityOptions; if (qualityOptions != null) { moduleValue = require(8912) /* metro dependency 8912: StreamQualityUtils */; trackStreamSettingsUpdate = moduleValue.trackStreamSettingsUpdate; qualityOptions = a0.qualityOptions; preset = qualityOptions.preset; qualityOptions = a0.qualityOptions; resolution = qualityOptions.resolution; qualityOptions = a0.qualityOptions; frameRate = qualityOptions.frameRate; desktopSettings = a0.desktopSettings; Reflect.apply(trackStreamSettingsUpdate, moduleValue, [preset, resolution, frameRate, desktopSettings == null ? value : desktopSettings.sound]); } (Dispatcher).dispatch({type: 'MEDIA_ENGINE_SET_GO_LIVE_SOURCE', settings: a0}); return value; } function setAecDump(a0) { // fn#69414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9089, offset: 0x01c732e5, size: 108 bytes, params: 2, frame: 17 var defaultImport; var value; if (!isNotSupported()) { defaultImport = importDefault(8903) /* metro dependency 8903: trackVoiceAndVideoSettingsUpdate */; value = MediaEngineStore.getAecDump(); defaultImport('diagnostic_audio_recording_enabled', a0, value); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'MEDIA_ENGINE_SET_AEC_DUMP', enabled: a0}); } } function interact() { // fn#69415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9239, offset: 0x01c73351, size: 62 bytes, params: 1, frame: 12 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'MEDIA_ENGINE_INTERACTION_REQUIRED', 'required': false}); } } function setEnableHardwareMuteNotice(a0) { // fn#69416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9330, offset: 0x01c7338f, size: 67 bytes, params: 2, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SET_ENABLE_HARDWARE_MUTE_NOTICE', enabled: a0}); } } function setKrispSuppressionLevel(a0) { // fn#69417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9450, offset: 0x01c733d2, size: 68 bytes, params: 2, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUDIO_SET_KRISP_SUPPRESSION_LEVEL', level: a0}); } } function setOpenH264Enabled_69420(a0) { // fn#69420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9782, offset: 0x01c73488, size: 67 bytes, params: 2, frame: 13 if (!isNotSupported()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SET_OPENH264_ENABLED', enabled: a0}); } } function resetMediaEngineSettings(a0) { // fn#69421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9084:9907, offset: 0x01c734cb, size: 55 bytes, params: 2, frame: 12 return (Dispatcher).dispatch({type: 'MEDIA_ENGINE_RESET_SETTINGS', overrides: a0}); } } global.__d(_fun69366, 8899, [5, 4293, 1379, 4259, 4294, 1934, 1878, 661, 8900, 4291, 3, 683, 6949, 694, 8901, 8903, 8904, 8912, 2]) /* metro module 8899, dependencies: [5, 4293, 1379, 4259, 4294, 1934, 1878, 661, 8900, 4291, 3, 683, 6949, 694, 8901, 8903, 8904, 8912, 2] */;