feat add button to mute all audios

This commit is contained in:
henne 2020-12-26 21:19:59 +01:00
parent c7d1654eca
commit 2c1e3cb78e
2 changed files with 14 additions and 2 deletions

View File

@ -70,6 +70,8 @@
<div style="display: none" id="room">
<div class="container-fluid" id="video-container">
</div>
<button onclick="toggleMute()">Toggle all mute</button>
Currently: <span id="muted-status">Unmuted</span>
</div>
@ -77,8 +79,6 @@
Change audio output device
<select id="audioOutputSelect" onchange="changeAudioOutput(this)"></select>
</div>
<video autoplay='autoplay' id="localVideo"></video>
</body>
</html>

View File

@ -20,6 +20,7 @@ const videoSize = {
let connection = null;
let room = null;
let muted = false;
// zu mappende namen.
let remoteMappingName = new Array(9);
@ -422,6 +423,17 @@ function leave() {
}
}
function toggleMute() {
let audioElems = $("audio");
muted = !muted;
audioElems.prop("muted", muted)
if(muted) {
$('#muted-status').text("Muted")
} else {
$('#muted-status').text("Unmuted")
}
}
function updateParticipantList() {
$('.available-users').text(room.getParticipants().map(p => p.getDisplayName() || 'Fellow Jitster').join(', '));
}