Skip to content

Commit

Permalink
Fixed not muting if there is more than one audio stream (#3051)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjnpnfigueiredo committed Sep 20, 2022
1 parent 535dd8a commit 84a7031
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions html/janus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2874,7 +2874,9 @@ function Janus(gatewayCallbacks) {
}
transceiver.sender.track.enabled = mute ? false : true;
} else {
config.myStream.getVideoTracks()[0].enabled = mute ? false : true;
for(const videostream of config.myStream.getVideoTracks()) {
videostream.enabled = !mute
}
}
} else {
// Mute/unmute audio track
Expand All @@ -2895,7 +2897,9 @@ function Janus(gatewayCallbacks) {
}
transceiver.sender.track.enabled = mute ? false : true;
} else {
config.myStream.getAudioTracks()[0].enabled = mute ? false : true;
for(const audiostream of config.myStream.getAudioTracks()) {
audiostream.enabled = !mute
}
}
}
return true;
Expand Down

0 comments on commit 84a7031

Please sign in to comment.