Selaa lähdekoodia

fed(UI): remove UI.setAudioMuted

factor2
Hristo Terezov 1 vuosi sitten
vanhempi
commit
a1ce6f1ce5
3 muutettua tiedostoa jossa 5 lisäystä ja 27 poistoa
  1. 3
    12
      conference.js
  2. 0
    10
      modules/UI/UI.js
  3. 2
    5
      react/features/base/tracks/middleware.web.ts

+ 3
- 12
conference.js Näytä tiedosto

@@ -636,7 +636,7 @@ export default {
636 636
         // so that the user can try unmute later on and add audio/video
637 637
         // to the conference
638 638
         if (!tracks.find(t => t.isAudioTrack())) {
639
-            this.setAudioMuteStatus(true);
639
+            this.updateAudioIconEnabled();
640 640
         }
641 641
 
642 642
         if (!tracks.find(t => t.isVideoTrack())) {
@@ -845,7 +845,7 @@ export default {
845 845
             // This will only modify base/media.audio.muted which is then synced
846 846
             // up with the track at the end of local tracks initialization.
847 847
             muteLocalAudio(mute);
848
-            this.setAudioMuteStatus(mute);
848
+            this.updateAudioIconEnabled();
849 849
 
850 850
             return;
851 851
         } else if (this.isLocalAudioMuted() === mute) {
@@ -1394,7 +1394,7 @@ export default {
1394 1394
                 APP.store.dispatch(
1395 1395
                 replaceLocalTrack(oldTrack, newTrack, room))
1396 1396
                     .then(() => {
1397
-                        this.setAudioMuteStatus(this.isLocalAudioMuted());
1397
+                        this.updateAudioIconEnabled();
1398 1398
                     })
1399 1399
                     .then(resolve)
1400 1400
                     .catch(reject)
@@ -2675,15 +2675,6 @@ export default {
2675 2675
         APP.UI.setVideoMuted(this.getMyUserId());
2676 2676
     },
2677 2677
 
2678
-    /**
2679
-     * Sets the audio muted status.
2680
-     *
2681
-     * @param {boolean} muted - New muted status.
2682
-     */
2683
-    setAudioMuteStatus(muted) {
2684
-        APP.UI.setAudioMuted(this.getMyUserId(), muted);
2685
-    },
2686
-
2687 2678
     /**
2688 2679
      * Dispatches the passed in feedback for submission. The submitted score
2689 2680
      * should be a number inclusively between 1 through 5, or -1 for no score.

+ 0
- 10
modules/UI/UI.js Näytä tiedosto

@@ -203,16 +203,6 @@ UI.toggleFilmstrip = function() {
203 203
     APP.store.dispatch(setFilmstripVisible(!visible));
204 204
 };
205 205
 
206
-/**
207
- * Sets muted audio state for participant
208
- */
209
-UI.setAudioMuted = function(id) {
210
-    // FIXME: Maybe this can be removed!
211
-    if (APP.conference.isLocalId(id)) {
212
-        APP.conference.updateAudioIconEnabled();
213
-    }
214
-};
215
-
216 206
 /**
217 207
  * Sets muted video state for participant
218 208
  */

+ 2
- 5
react/features/base/tracks/middleware.web.ts Näytä tiedosto

@@ -75,7 +75,7 @@ MiddlewareRegistry.register(store => next => action => {
75 75
         } else if (isVideoTrack) {
76 76
             APP.conference.setVideoMuteStatus();
77 77
         } else {
78
-            APP.conference.setAudioMuteStatus(!muted);
78
+            APP.conference.updateAudioIconEnabled();
79 79
         }
80 80
 
81 81
         break;
@@ -102,7 +102,6 @@ MiddlewareRegistry.register(store => next => action => {
102 102
         }
103 103
 
104 104
         const { jitsiTrack } = action.track;
105
-        const muted = jitsiTrack.isMuted();
106 105
         const participantID = jitsiTrack.getParticipantId();
107 106
         const isVideoTrack = jitsiTrack.type !== MEDIA_TYPE.AUDIO;
108 107
 
@@ -113,9 +112,7 @@ MiddlewareRegistry.register(store => next => action => {
113 112
                 APP.UI.setVideoMuted(participantID);
114 113
             }
115 114
         } else if (jitsiTrack.isLocal()) {
116
-            APP.conference.setAudioMuteStatus(muted);
117
-        } else {
118
-            APP.UI.setAudioMuted(participantID, muted);
115
+            APP.conference.updateAudioIconEnabled();
119 116
         }
120 117
 
121 118
         return result;

Loading…
Peruuta
Tallenna