Skip to content

Commit

Permalink
fix(RTCUtils) Return false for device change checks on mobile Safari.
Browse files Browse the repository at this point in the history
  • Loading branch information
jallamsetty1 committed Sep 9, 2021
1 parent 735943b commit ad1f06d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 2 additions & 3 deletions JitsiMediaDevices.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,12 @@ class JitsiMediaDevices {
}

/**
* Returns true if it is possible to be simultaneously capturing audio
* from more than one device.
* Returns true if it is possible to be simultaneously capturing audio from more than one device.
*
* @returns {boolean}
*/
isMultipleAudioInputSupported() {
return !browser.isFirefox();
return !(browser.isFirefox() || browser.isIosBrowser());
}

/**
Expand Down
15 changes: 12 additions & 3 deletions modules/RTC/RTCUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,18 @@ class RTCUtils extends Listenable {
* @returns {boolean} true if available, false otherwise.
*/
isDeviceChangeAvailable(deviceType) {
return deviceType === 'output' || deviceType === 'audiooutput'
? isAudioOutputDeviceChangeAvailable
: true;
if (deviceType === 'output' || deviceType === 'audiooutput') {
return isAudioOutputDeviceChangeAvailable;
}

// Calling getUserMedia again (for preview) kills the track returned by the first getUserMedia call because of
// https://bugs.webkit.org/show_bug.cgi?id=179363. Therefore, do not show microphone/camera options on mobile
// Safari.
if ((deviceType === 'audioinput' || deviceType === 'input') && browser.isIosBrowser()) {
return false;
}

return true;
}

/**
Expand Down

0 comments on commit ad1f06d

Please sign in to comment.