Переглянути джерело

Fixes unplugging unused device mutes local audio and video.

j8
damencho 8 роки тому
джерело
коміт
beffdb1e9b
1 змінених файлів з 2 додано та 11 видалено
  1. 2
    11
      conference.js

+ 2
- 11
conference.js Переглянути файл

@@ -2408,10 +2408,6 @@ export default {
2408 2408
         const promises = [];
2409 2409
         const audioWasMuted = this.isLocalAudioMuted();
2410 2410
         const videoWasMuted = this.isLocalVideoMuted();
2411
-        const availableAudioInputDevices
2412
-            = mediaDeviceHelper.getDevicesFromListByKind(devices, 'audioinput');
2413
-        const availableVideoInputDevices
2414
-            = mediaDeviceHelper.getDevicesFromListByKind(devices, 'videoinput');
2415 2411
 
2416 2412
         if (typeof newDevices.audiooutput !== 'undefined') {
2417 2413
             // Just ignore any errors in catch block.
@@ -2430,9 +2426,7 @@ export default {
2430 2426
                 .then(() => {
2431 2427
                     // If audio was muted before, or we unplugged current device
2432 2428
                     // and selected new one, then mute new audio track.
2433
-                    if (audioWasMuted
2434
-                        || currentDevices.audioinput.length
2435
-                        > availableAudioInputDevices.length) {
2429
+                    if (audioWasMuted) {
2436 2430
                         sendAnalyticsEvent('deviceListChanged.audio.muted');
2437 2431
                         logger.log('Audio mute: device list changed');
2438 2432
                         muteLocalAudio(true);
@@ -2440,10 +2434,7 @@ export default {
2440 2434
 
2441 2435
                     // If video was muted before, or we unplugged current device
2442 2436
                     // and selected new one, then mute new video track.
2443
-                    if (!this.isSharingScreen
2444
-                        && (videoWasMuted
2445
-                            || currentDevices.videoinput.length
2446
-                                > availableVideoInputDevices.length)) {
2437
+                    if (!this.isSharingScreen && videoWasMuted) {
2447 2438
                         sendAnalyticsEvent('deviceListChanged.video.muted');
2448 2439
                         logger.log('Video mute: device list changed');
2449 2440
                         muteLocalVideo(true);

Завантаження…
Відмінити
Зберегти