Przeglądaj źródła

Device selection now always shows the device that it managed to open. (#4384)

* Device selection now always shows the device that managed to open.

* Simplifies implementation, skips using state.
j8
Дамян Минков 6 lat temu
rodzic
commit
9c1b802997
No account linked to committer's email address

+ 4
- 2
react/features/device-selection/components/DeviceSelection.js Wyświetl plik

@@ -372,7 +372,8 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
372 372
                 label: 'settings.selectCamera',
373 373
                 onSelect: selectedVideoInputId =>
374 374
                     super._onChange({ selectedVideoInputId }),
375
-                selectedDeviceId: this.props.selectedVideoInputId
375
+                selectedDeviceId: this.state.previewVideoTrack
376
+                    ? this.state.previewVideoTrack.getDeviceId() : null
376 377
             },
377 378
             {
378 379
                 devices: availableDevices.audioInput,
@@ -384,7 +385,8 @@ class DeviceSelection extends AbstractDialogTab<Props, State> {
384 385
                 label: 'settings.selectMic',
385 386
                 onSelect: selectedAudioInputId =>
386 387
                     super._onChange({ selectedAudioInputId }),
387
-                selectedDeviceId: this.props.selectedAudioInputId
388
+                selectedDeviceId: this.state.previewAudioTrack
389
+                    ? this.state.previewAudioTrack.getDeviceId() : null
388 390
             }
389 391
         ];
390 392
 

Ładowanie…
Anuluj
Zapisz