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

Implement mike-only login.

parent 9110d03a
...@@ -119,6 +119,8 @@ ...@@ -119,6 +119,8 @@
<label>Present:</label> <label>Present:</label>
<input id="presentoff" type="radio" name="presentradio" value="" checked/> <input id="presentoff" type="radio" name="presentradio" value="" checked/>
<label for="presentoff">nothing</label> <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"/> <input id="presentboth" type="radio" name="presentradio" value="both"/>
<label for="presentoff">camera and mike</label> <label for="presentoff">camera and mike</label>
<div class="clear"></div> <div class="clear"></div>
......
...@@ -269,7 +269,6 @@ function setConnected(connected) { ...@@ -269,7 +269,6 @@ function setConnected(connected) {
userpass ? userpass.username : ''; userpass ? userpass.username : '';
getInputElement('password').value = getInputElement('password').value =
userpass ? userpass.password : ''; userpass ? userpass.password : '';
getInputElement('presentoff').checked = true;
userbox.classList.add('invisible'); userbox.classList.add('invisible');
connectionbox.classList.remove('invisible'); connectionbox.classList.remove('invisible');
displayError("Disconnected!", "error"); displayError("Disconnected!", "error");
...@@ -2038,7 +2037,15 @@ document.getElementById('userform').onsubmit = async function(e) { ...@@ -2038,7 +2037,15 @@ document.getElementById('userform').onsubmit = async function(e) {
} }
let presentboth = getInputElement('presentboth').checked; 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'); let button = getButtonElement('presentbutton');
button.disabled = true; button.disabled = true;
try { try {
...@@ -2049,6 +2056,8 @@ document.getElementById('userform').onsubmit = async function(e) { ...@@ -2049,6 +2056,8 @@ document.getElementById('userform').onsubmit = async function(e) {
button.disabled = false; button.disabled = false;
} }
} }
getInputElement('presentoff').checked = true;
}; };
document.getElementById('disconnectbutton').onclick = function(e) { 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