Skip to content

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

fed(UI): remove UI.setAudioMuted

Hristo Terezova1ce6f1ce5d2
diff --git a/conference.js b/conference.js
index 587aaefe81..08c0f72041 100644
--- a/conference.js
+++ b/conference.js
@@ -636,7 +636,7 @@ export default {
// so that the user can try unmute later on and add audio/video
// to the conference
if (!tracks.find(t => t.isAudioTrack())) {
- this.setAudioMuteStatus(true);
+ this.updateAudioIconEnabled();
}
if (!tracks.find(t => t.isVideoTrack())) {
@@ -845,7 +845,7 @@ export default {
// This will only modify base/media.audio.muted which is then synced
// up with the track at the end of local tracks initialization.
muteLocalAudio(mute);
- this.setAudioMuteStatus(mute);
+ this.updateAudioIconEnabled();
return;
} else if (this.isLocalAudioMuted() === mute) {
@@ -1394,7 +1394,7 @@ export default {
APP.store.dispatch(
replaceLocalTrack(oldTrack, newTrack, room))
.then(() => {
- this.setAudioMuteStatus(this.isLocalAudioMuted());
+ this.updateAudioIconEnabled();
})
.then(resolve)
.catch(reject)
@@ -2675,15 +2675,6 @@ export default {
APP.UI.setVideoMuted(this.getMyUserId());
},
- /**
- * Sets the audio muted status.
- *
- * @param {boolean} muted - New muted status.
- */
- setAudioMuteStatus(muted) {
- APP.UI.setAudioMuted(this.getMyUserId(), muted);
- },
-
/**
* Dispatches the passed in feedback for submission. The submitted score
* should be a number inclusively between 1 through 5, or -1 for no score.
diff --git a/modules/UI/UI.js b/modules/UI/UI.js
index 92c4c1cf23..7b7d2660b1 100644
--- a/modules/UI/UI.js
+++ b/modules/UI/UI.js
@@ -203,16 +203,6 @@ UI.toggleFilmstrip = function() {
APP.store.dispatch(setFilmstripVisible(!visible));
};
-/**
- * Sets muted audio state for participant
- */
-UI.setAudioMuted = function(id) {
- // FIXME: Maybe this can be removed!
- if (APP.conference.isLocalId(id)) {
- APP.conference.updateAudioIconEnabled();
- }
-};
-
/**
* Sets muted video state for participant
*/
diff --git a/react/features/base/tracks/middleware.web.ts b/react/features/base/tracks/middleware.web.ts
index cd6b2884ee..aa7383ba39 100644
--- a/react/features/base/tracks/middleware.web.ts
+++ b/react/features/base/tracks/middleware.web.ts
@@ -75,7 +75,7 @@ MiddlewareRegistry.register(store => next => action => {
} else if (isVideoTrack) {
APP.conference.setVideoMuteStatus();
} else {
- APP.conference.setAudioMuteStatus(!muted);
+ APP.conference.updateAudioIconEnabled();
}
break;
@@ -102,7 +102,6 @@ MiddlewareRegistry.register(store => next => action => {
}
const { jitsiTrack } = action.track;
- const muted = jitsiTrack.isMuted();
const participantID = jitsiTrack.getParticipantId();
const isVideoTrack = jitsiTrack.type !== MEDIA_TYPE.AUDIO;
@@ -113,9 +112,7 @@ MiddlewareRegistry.register(store => next => action => {
APP.UI.setVideoMuted(participantID);
}
} else if (jitsiTrack.isLocal()) {
- APP.conference.setAudioMuteStatus(muted);
- } else {
- APP.UI.setAudioMuted(participantID, muted);
+ APP.conference.updateAudioIconEnabled();
}
return result;