fix(deviceChange):Dont create video track if muted
This commit is contained in:
parent
9c10ac3028
commit
007183c151
|
@ -2604,6 +2604,20 @@ export default {
|
||||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=997689
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=997689
|
||||||
const hasDefaultMicChanged = newDevices.audioinput === 'default';
|
const hasDefaultMicChanged = newDevices.audioinput === 'default';
|
||||||
|
|
||||||
|
// This is the case when the local video is muted and a preferred device is connected.
|
||||||
|
if (requestedInput.video && this.isLocalVideoMuted()) {
|
||||||
|
// We want to avoid creating a new video track in order to prevent turning on the camera.
|
||||||
|
requestedInput.video = false;
|
||||||
|
APP.store.dispatch(updateSettings({ // Update the current selected camera for the device selection dialog.
|
||||||
|
cameraDeviceId: newDevices.videoinput
|
||||||
|
}));
|
||||||
|
delete newDevices.videoinput;
|
||||||
|
|
||||||
|
// Removing the current video track in order to force the unmute to select the preferred device.
|
||||||
|
this.useVideoStream(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
promises.push(
|
promises.push(
|
||||||
mediaDeviceHelper.createLocalTracksAfterDeviceListChanged(
|
mediaDeviceHelper.createLocalTracksAfterDeviceListChanged(
|
||||||
createLocalTracksF,
|
createLocalTracksF,
|
||||||
|
|
Loading…
Reference in New Issue