mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Mute local audio when streaming video.
This commit is contained in:
parent
4c0fd01258
commit
e2a79e24a1
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue