fix(device-selection): pass dispatch so preferred speaker is saved
This commit is contained in:
parent
b9f28a1beb
commit
44baca3185
|
@ -2137,7 +2137,7 @@ export default {
|
||||||
UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
|
UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
|
||||||
audioOutputDeviceId => {
|
audioOutputDeviceId => {
|
||||||
sendAnalytics(createDeviceChangedEvent('audio', 'output'));
|
sendAnalytics(createDeviceChangedEvent('audio', 'output'));
|
||||||
setAudioOutputDeviceId(audioOutputDeviceId)
|
setAudioOutputDeviceId(audioOutputDeviceId, APP.store.dispatch)
|
||||||
.then(() => logger.log('changed audio output device'))
|
.then(() => logger.log('changed audio output device'))
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
logger.warn('Failed to change audio output device. '
|
logger.warn('Failed to change audio output device. '
|
||||||
|
@ -2374,9 +2374,13 @@ export default {
|
||||||
const videoWasMuted = this.isLocalVideoMuted();
|
const videoWasMuted = this.isLocalVideoMuted();
|
||||||
|
|
||||||
if (typeof newDevices.audiooutput !== 'undefined') {
|
if (typeof newDevices.audiooutput !== 'undefined') {
|
||||||
// Just ignore any errors in catch block.
|
const { dispatch } = APP.store;
|
||||||
promises.push(setAudioOutputDeviceId(newDevices.audiooutput)
|
const setAudioOutputPromise
|
||||||
.catch());
|
= setAudioOutputDeviceId(newDevices.audiooutput, dispatch)
|
||||||
|
.catch(); // Just ignore any errors in catch block.
|
||||||
|
|
||||||
|
|
||||||
|
promises.push(setAudioOutputPromise);
|
||||||
}
|
}
|
||||||
|
|
||||||
promises.push(
|
promises.push(
|
||||||
|
|
Loading…
Reference in New Issue