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

Add option to disable mirror view.

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