Commit e2a79e24 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Mute local audio when streaming video.

parent 4c0fd012
......@@ -900,6 +900,15 @@ async function addFileMedia(file) {
c.stream = stream;
stream.onaddtrack = function(e) {
let t = e.track;
if(t.kind === 'audio') {
let presenting = !!findUpMedia('local');
let muted = getSettings().localMute;
if(presenting && !muted) {
setLocalMute(true);
updateSettings({localMute: true});
displayWarning('You have been muted');
}
}
c.pc.addTrack(t, stream);
c.labels[t.id] = t.kind;
c.onstats = gotUpStats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment