From 71744c44ca06a6e48b9b6b460730e4da39c6868c Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 30 Nov 2020 21:28:45 +0100 Subject: [PATCH] Implement mike-only login. --- static/sfu.html | 2 ++ static/sfu.js | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/static/sfu.html b/static/sfu.html index c57168d..80b1d59 100644 --- a/static/sfu.html +++ b/static/sfu.html @@ -119,6 +119,8 @@ + +
diff --git a/static/sfu.js b/static/sfu.js index 4084199..39d5940 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -269,7 +269,6 @@ function setConnected(connected) { userpass ? userpass.username : ''; getInputElement('password').value = userpass ? userpass.password : ''; - getInputElement('presentoff').checked = true; userbox.classList.add('invisible'); connectionbox.classList.remove('invisible'); displayError("Disconnected!", "error"); @@ -2038,7 +2037,15 @@ document.getElementById('userform').onsubmit = async function(e) { } let presentboth = getInputElement('presentboth').checked; - if(presentboth) { + let presentmike = getInputElement('presentmike').checked; + + if(presentmike) + updateSettings({video: ''}); + else if(presentboth) + delSetting('video'); + reflectSettings(); + + if(presentboth || presentmike) { let button = getButtonElement('presentbutton'); button.disabled = true; try { @@ -2049,6 +2056,8 @@ document.getElementById('userform').onsubmit = async function(e) { button.disabled = false; } } + + getInputElement('presentoff').checked = true; }; document.getElementById('disconnectbutton').onclick = function(e) {