1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

Implement mike-only login.

This commit is contained in:
Juliusz Chroboczek 2020-11-30 21:28:45 +01:00
parent 9110d03a9a
commit 71744c44ca
2 changed files with 13 additions and 2 deletions

View file

@ -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>

View file

@ -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) {
} }
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) {
button.disabled = false; button.disabled = false;
} }
} }
getInputElement('presentoff').checked = true;
}; };
document.getElementById('disconnectbutton').onclick = function(e) { document.getElementById('disconnectbutton').onclick = function(e) {