Commit 2c17157e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement automatic enabling of camera.

parent 4c976293
......@@ -456,7 +456,7 @@ textarea.form-reply {
position: absolute;
top: 15%;
left: 25%;
width: 21em;
width: 30em;
padding: 2em;
}
......
......@@ -127,6 +127,11 @@
<label for="password">Password:</label>
<input id="password" type="password" name="password"
autocomplete="current-password" class="form-control"/>
<label>Present:</label>
<input id="presentoff" type="radio" name="presentradio" value="" checked/>
<label for="presentoff">nothing</label>
<input id="presentboth" type="radio" name="presentradio" value="both"/>
<label for="presentoff">camera and mike</label>
<div class="clear"></div>
<input id="connectbutton" type="submit" class="btn btn-blue" value="Connect"/>
</form>
......
......@@ -272,6 +272,7 @@ function setConnected(connected) {
userpass ? userpass.username : '';
getInputElement('password').value =
userpass ? userpass.password : '';
getInputElement('presentoff').checked = true;
statspan.textContent = 'Disconnected';
statspan.classList.remove('connected');
statspan.classList.add('disconnected');
......@@ -1937,6 +1938,19 @@ document.getElementById('userform').onsubmit = async function(e) {
} finally {
connecting = false;
}
let presentboth = getInputElement('presentboth').checked;
if(presentboth) {
let button = getButtonElement('presentbutton');
button.disabled = true;
try {
let id = findUpMedia('local');
if(!id)
await addLocalMedia();
} finally {
button.disabled = false;
}
}
};
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