浏览代码

fix(device-selection): use persisted settings as default values if available

j8
Leonard Kim 6 年前
父节点
当前提交
5d4a2e87f8
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8
    8
      react/features/base/settings/reducer.js

+ 8
- 8
react/features/base/settings/reducer.js 查看文件

@@ -128,7 +128,14 @@ function _initSettings(featureState) {
128 128
         const audioOutputDeviceId
129 129
             = window.localStorage.getItem('audioOutputDeviceId') || 'default';
130 130
 
131
-        if (audioOutputDeviceId
131
+        settings = assignIfDefined({
132
+            audioOutputDeviceId,
133
+            cameraDeviceId,
134
+            localFlipX,
135
+            micDeviceId
136
+        }, settings);
137
+
138
+        if (settings.audioOutputDeviceId
132 139
             !== JitsiMeetJS.mediaDevices.getAudioOutputDevice()) {
133 140
             JitsiMeetJS.mediaDevices.setAudioOutputDevice(
134 141
                 audioOutputDeviceId
@@ -138,13 +145,6 @@ function _initSettings(featureState) {
138 145
                     + 'instead.', ex);
139 146
             });
140 147
         }
141
-
142
-        settings = assignIfDefined({
143
-            audioOutputDeviceId,
144
-            cameraDeviceId,
145
-            localFlipX,
146
-            micDeviceId
147
-        }, settings);
148 148
     }
149 149
 
150 150
     // Things we stored in profile earlier

正在加载...
取消
保存