From 58d98ad7d374632c7c06161efd04ef3a3ba9602c Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Thu, 16 Sep 2021 15:05:43 -0400 Subject: [PATCH] fix(device-selection) Do not create preview when mic selection is disabled. This fixes an issue on mobile Safari when audio is lost after the user opens the device selection menu. --- .../features/device-selection/components/DeviceSelection.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/react/features/device-selection/components/DeviceSelection.js b/react/features/device-selection/components/DeviceSelection.js index 74077865f..385a08334 100644 --- a/react/features/device-selection/components/DeviceSelection.js +++ b/react/features/device-selection/components/DeviceSelection.js @@ -258,6 +258,12 @@ class DeviceSelection extends AbstractDialogTab { * @returns {void} */ _createAudioInputTrack(deviceId) { + const { hideAudioInputPreview } = this.props; + + if (hideAudioInputPreview) { + return; + } + return this._disposeAudioInputPreview() .then(() => createLocalTrack('audio', deviceId, 5000)) .then(jitsiLocalTrack => {