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

This commit is contained in:
Leonard Kim 2018-07-13 10:04:09 -07:00 committed by virtuacoplenny
parent 44baca3185
commit 5d4a2e87f8
1 changed files with 8 additions and 8 deletions

View File

@ -128,7 +128,14 @@ function _initSettings(featureState) {
const audioOutputDeviceId
= window.localStorage.getItem('audioOutputDeviceId') || 'default';
if (audioOutputDeviceId
settings = assignIfDefined({
audioOutputDeviceId,
cameraDeviceId,
localFlipX,
micDeviceId
}, settings);
if (settings.audioOutputDeviceId
!== JitsiMeetJS.mediaDevices.getAudioOutputDevice()) {
JitsiMeetJS.mediaDevices.setAudioOutputDevice(
audioOutputDeviceId
@ -138,13 +145,6 @@ function _initSettings(featureState) {
+ 'instead.', ex);
});
}
settings = assignIfDefined({
audioOutputDeviceId,
cameraDeviceId,
localFlipX,
micDeviceId
}, settings);
}
// Things we stored in profile earlier