Commit 8e395e38 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add option to disable mirror view.

parent 8a44726f
......@@ -180,7 +180,12 @@
<select id="audioselect" class="select select-inline">
<option value="">off</option>
</select>
<form>
<input id="mirrorbox" type="checkbox" checked/>
<label for="mirrobox">Mirror view</label>
</form>
<form>
<input id="blackboardbox" type="checkbox"/>
<label for="blackboardbox">Blackboard mode</label>
......
......@@ -82,6 +82,7 @@ function getUserPass() {
* @property {string} [request]
* @property {boolean} [activityDetection]
* @property {Array.<number>} [resolution]
* @property {boolean} [mirrorView]
* @property {boolean} [blackboardMode]
* @property {string} [filter]
*/
......@@ -234,6 +235,13 @@ function reflectSettings() {
store = true;
}
if(settings.hasOwnProperty('mirrorView')) {
getInputElement('mirrorbox').checked = settings.mirrorView;
} else {
settings.mirrorView = getInputElement('mirrorbox').checked;
store = true;
}
if(settings.hasOwnProperty('activityDetection')) {
getInputElement('activitybox').checked = settings.activityDetection;
} else {
......@@ -470,6 +478,14 @@ getSelectElement('audioselect').onchange = function(e) {
changePresentation();
};
getInputElement('mirrorbox').onchange = function(e) {
e.preventDefault();
if(!(this instanceof HTMLInputElement))
throw new Error('Unexpected type for this');
updateSettings({mirrorView: this.checked});
changePresentation();
};
getInputElement('blackboardbox').onchange = function(e) {
e.preventDefault();
if(!(this instanceof HTMLInputElement))
......@@ -1095,7 +1111,7 @@ async function addLocalMedia(id) {
c.onstats = gotUpStats;
c.setStatsInterval(2000);
await setMedia(c, true, true);
await setMedia(c, true, settings.mirrorView);
setButtonsVisibility();
}
......
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