Commit 71744c44 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement mike-only login.

parent 9110d03a
......@@ -119,6 +119,8 @@
<label>Present:</label>
<input id="presentoff" type="radio" name="presentradio" value="" checked/>
<label for="presentoff">nothing</label>
<input id="presentmike" type="radio" name="presentradio" value="mike"/>
<label for="presentmike">mike only</label>
<input id="presentboth" type="radio" name="presentradio" value="both"/>
<label for="presentoff">camera and mike</label>
<div class="clear"></div>
......
......@@ -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) {
......
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