Fixes the local audio levels when the user is muted.
This commit is contained in:
parent
83b4ee96d3
commit
0e7c1ed9a9
16
app.js
16
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) {
|
||||
|
|
Loading…
Reference in New Issue