mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +01:00
Add option to disable mirror view.
This commit is contained in:
parent
8a44726f89
commit
8e395e38ac
2 changed files with 23 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue