Преглед изворни кода

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

master
Leonard Kim пре 7 година
родитељ
комит
44baca3185
1 измењених фајлова са 8 додато и 4 уклоњено
  1. 8
    4
      conference.js

+ 8
- 4
conference.js Прегледај датотеку

2137
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
2137
             UIEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
2138
             audioOutputDeviceId => {
2138
             audioOutputDeviceId => {
2139
                 sendAnalytics(createDeviceChangedEvent('audio', 'output'));
2139
                 sendAnalytics(createDeviceChangedEvent('audio', 'output'));
2140
-                setAudioOutputDeviceId(audioOutputDeviceId)
2140
+                setAudioOutputDeviceId(audioOutputDeviceId, APP.store.dispatch)
2141
                     .then(() => logger.log('changed audio output device'))
2141
                     .then(() => logger.log('changed audio output device'))
2142
                     .catch(err => {
2142
                     .catch(err => {
2143
                         logger.warn('Failed to change audio output device. '
2143
                         logger.warn('Failed to change audio output device. '
2374
         const videoWasMuted = this.isLocalVideoMuted();
2374
         const videoWasMuted = this.isLocalVideoMuted();
2375
 
2375
 
2376
         if (typeof newDevices.audiooutput !== 'undefined') {
2376
         if (typeof newDevices.audiooutput !== 'undefined') {
2377
-            // Just ignore any errors in catch block.
2378
-            promises.push(setAudioOutputDeviceId(newDevices.audiooutput)
2379
-                .catch());
2377
+            const { dispatch } = APP.store;
2378
+            const setAudioOutputPromise
2379
+                = setAudioOutputDeviceId(newDevices.audiooutput, dispatch)
2380
+                    .catch(); // Just ignore any errors in catch block.
2381
+
2382
+
2383
+            promises.push(setAudioOutputPromise);
2380
         }
2384
         }
2381
 
2385
 
2382
         promises.push(
2386
         promises.push(

Loading…
Откажи
Сачувај