Просмотр исходного кода

fix(screenshare): audio screen share muted state

dev1
Andrei Gavrilescu 4 лет назад
Родитель
Сommit
676c7a9105
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 12 добавлений и 1 удалений
  1. 12
    1
      modules/RTC/JitsiLocalTrack.js

+ 12
- 1
modules/RTC/JitsiLocalTrack.js Просмотреть файл

510
                 || this.videoType === VideoType.DESKTOP
510
                 || this.videoType === VideoType.DESKTOP
511
                 || !browser.doesVideoMuteByStreamRemove()) {
511
                 || !browser.doesVideoMuteByStreamRemove()) {
512
             logMuteInfo();
512
             logMuteInfo();
513
-            if (this.track) {
513
+
514
+            // If we have a stream effect that implements its own mute functionality, prioritize it before
515
+            // normal mute e.g. the stream effect that implements system audio sharing has a custom
516
+            // mute state in which if the user mutes, system audio still has to go through.
517
+            if (this._streamEffect && this._streamEffect.setMuted) {
518
+                this._streamEffect.setMuted(muted);
519
+            } else if (this.track) {
514
                 this.track.enabled = !muted;
520
                 this.track.enabled = !muted;
515
             }
521
             }
516
         } else if (muted) {
522
         } else if (muted) {
714
             return true;
720
             return true;
715
         }
721
         }
716
 
722
 
723
+        // If currently used stream effect has its own muted state, use that.
724
+        if (this._streamEffect && this._streamEffect.isMuted) {
725
+            return this._streamEffect.isMuted();
726
+        }
727
+
717
         return !this.track || !this.track.enabled;
728
         return !this.track || !this.track.enabled;
718
     }
729
     }
719
 
730
 

Загрузка…
Отмена
Сохранить