fix(external-api): persist audio output device

This commit is contained in:
Andrei Gavrilescu 2021-07-30 14:51:47 +03:00 committed by GitHub
parent af9958ad66
commit d0be8dcf9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -10,7 +10,7 @@ import {
getDeviceIdByLabel, getDeviceIdByLabel,
groupDevicesByKind, groupDevicesByKind,
setAudioInputDeviceAndUpdateSettings, setAudioInputDeviceAndUpdateSettings,
setAudioOutputDeviceId, setAudioOutputDevice,
setVideoInputDeviceAndUpdateSettings setVideoInputDeviceAndUpdateSettings
} from '../base/devices'; } from '../base/devices';
import { isIosMobileBrowser } from '../base/environment/utils'; import { isIosMobileBrowser } from '../base/environment/utils';
@ -189,12 +189,11 @@ export function processExternalDeviceRequest( // eslint-disable-line max-params
if (deviceId) { if (deviceId) {
switch (device.kind) { switch (device.kind) {
case 'audioinput': { case 'audioinput':
dispatch(setAudioInputDeviceAndUpdateSettings(deviceId)); dispatch(setAudioInputDeviceAndUpdateSettings(deviceId));
break; break;
}
case 'audiooutput': case 'audiooutput':
setAudioOutputDeviceId(deviceId, dispatch); dispatch(setAudioOutputDevice(deviceId));
break; break;
case 'videoinput': case 'videoinput':
dispatch(setVideoInputDeviceAndUpdateSettings(deviceId)); dispatch(setVideoInputDeviceAndUpdateSettings(deviceId));