mirror of
https://github.com/jech/galene.git
synced 2024-11-23 00:55:58 +01:00
Fix checkbox for activity detection, increase interval to 200ms.
This commit is contained in:
parent
f2fcc09e61
commit
aa3e094f65
1 changed files with 4 additions and 4 deletions
|
@ -166,7 +166,7 @@ function gotDownStream(c) {
|
||||||
setMediaStatus(c);
|
setMediaStatus(c);
|
||||||
}
|
}
|
||||||
c.onstats = gotDownStats;
|
c.onstats = gotDownStats;
|
||||||
if(document.getElementById('activitybox').value)
|
if(document.getElementById('activitybox').checked)
|
||||||
c.setStatsInterval(activityDetectionInterval);
|
c.setStatsInterval(activityDetectionInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,14 +309,14 @@ document.getElementById('requestselect').onchange = function(e) {
|
||||||
serverConnection.request(this.value);
|
serverConnection.request(this.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const activityDetectionInterval = 100;
|
const activityDetectionInterval = 200;
|
||||||
const activityDetectionPeriod = 700;
|
const activityDetectionPeriod = 700;
|
||||||
const activityDetectionThreshold = 0.2;
|
const activityDetectionThreshold = 0.2;
|
||||||
|
|
||||||
document.getElementById('activitybox').onchange = function(e) {
|
document.getElementById('activitybox').onchange = function(e) {
|
||||||
for(let id in serverConnection.down) {
|
for(let id in serverConnection.down) {
|
||||||
let c = serverConnection.down[id];
|
let c = serverConnection.down[id];
|
||||||
if(this.value)
|
if(this.checked)
|
||||||
c.setStatsInterval(activityDetectionInterval);
|
c.setStatsInterval(activityDetectionInterval);
|
||||||
else {
|
else {
|
||||||
setActive(c, false);
|
setActive(c, false);
|
||||||
|
@ -357,7 +357,7 @@ function setActive(c, value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function gotDownStats(stats) {
|
function gotDownStats(stats) {
|
||||||
if(!document.getElementById('activitybox').value)
|
if(!document.getElementById('activitybox').checked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let c = this;
|
let c = this;
|
||||||
|
|
Loading…
Reference in a new issue