Skip to content

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

Fixes the local audio levels when the user is muted.

hristoterezov0e7c1ed9a9f8
diff --git a/app.js b/app.js
index 9cacb7b37d..f7ac1bd538 100644
--- a/app.js
+++ b/app.js
@@ -455,6 +455,8 @@ function audioLevelUpdated(jid, audioLevel)
if(jid === LocalStatsCollector.LOCAL_JID)
{
resourceJid = AudioLevels.LOCAL_LEVEL;
+ if(isAudioMuted())
+ return;
}
else
{
@@ -901,6 +903,20 @@ function toggleAudio() {
buttonClick("#mute", "icon-microphone icon-mic-disabled");
}
+/**
+ * Checks whether the audio is muted or not.
+ * @returns {boolean} true if audio is muted and false if not.
+ */
+function isAudioMuted()
+{
+ var localAudio = connection.jingle.localAudio;
+ for (var idx = 0; idx < localAudio.getAudioTracks().length; idx++) {
+ if(localAudio.getAudioTracks()[idx].enabled === true)
+ return false;
+ }
+ return true;
+}
+
// Starts or stops the recording for the conference.
function toggleRecording() {
if (focus === null || focus.confid === null) {