Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(device-selection): pass dispatch so preferred speaker is saved

Leonard Kim44baca3185d0
diff --git a/conference.js b/conference.js
index aa6d63745a..c6a9b8d0e2 100644
--- a/conference.js
+++ b/conference.js
@@ -2137,7 +2137,7 @@ export default {
UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
audioOutputDeviceId => {
sendAnalytics(createDeviceChangedEvent('audio', 'output'));
- setAudioOutputDeviceId(audioOutputDeviceId)
+ setAudioOutputDeviceId(audioOutputDeviceId, APP.store.dispatch)
.then(() => logger.log('changed audio output device'))
.catch(err => {
logger.warn('Failed to change audio output device. '
@@ -2374,9 +2374,13 @@ export default {
const videoWasMuted = this.isLocalVideoMuted();
if (typeof newDevices.audiooutput !== 'undefined') {
- // Just ignore any errors in catch block.
- promises.push(setAudioOutputDeviceId(newDevices.audiooutput)
- .catch());
+ const { dispatch } = APP.store;
+ const setAudioOutputPromise
+ = setAudioOutputDeviceId(newDevices.audiooutput, dispatch)
+ .catch(); // Just ignore any errors in catch block.
+
+
+ promises.push(setAudioOutputPromise);
}
promises.push(