From f3beaa85d8e5e7667664a563e49d6e8291c95524 Mon Sep 17 00:00:00 2001
From: Greg Fodor <gfodor@gmail.com>
Date: Wed, 4 Apr 2018 11:52:48 -0700
Subject: [PATCH] Switch to ideal for constraints for last used mic, so user
 can override

---
 src/react-components/ui-root.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js
index b51649860..56e57b92d 100644
--- a/src/react-components/ui-root.js
+++ b/src/react-components/ui-root.js
@@ -292,7 +292,7 @@ class UIRoot extends Component {
 
     // Try to fetch last used mic, and if we don't get it then fall back to default.
     if (lastUsedMicDeviceId) {
-      hasAudio = await this.fetchAudioTrack({ audio: { deviceId: { exact: lastUsedMicDeviceId } } });
+      hasAudio = await this.fetchAudioTrack({ audio: { deviceId: { ideal: lastUsedMicDeviceId } } });
     }
 
     if (!hasAudio) {
@@ -417,7 +417,6 @@ class UIRoot extends Component {
   fetchMicDevices = () => {
     return new Promise(resolve => {
       navigator.mediaDevices.enumerateDevices().then(mediaDevices => {
-        console.log(resolve);
         this.setState(
           {
             micDevices: mediaDevices
-- 
GitLab