|
|
|
|
@ -84,15 +84,18 @@
|
|
|
|
|
const arraySum = array.reduce((a, value) => a + value, 0);
|
|
|
|
|
this.micLevel = arraySum / array.length;
|
|
|
|
|
|
|
|
|
|
if(this.micLevel > this.micThreshold){
|
|
|
|
|
this.micThresholdExceeded = true;
|
|
|
|
|
} else {
|
|
|
|
|
if(this.micLevel < this.micThreshold){
|
|
|
|
|
this.secondsToSubtract++;
|
|
|
|
|
this.micThresholdExceeded = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(this.micLevel >= this.micThreshold){
|
|
|
|
|
this.micThresholdExceeded = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.micThresholdExceeded = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.totalSeconds = getAccumulatedSeconds(Date.now(), this.startTime) - this.secondsToSubtract + this.savedPreviousSeconds;
|
|
|
|
|
window.localStorage.setItem('lastTotalSeconds', this.totalSeconds);
|
|
|
|
|
|
|
|
|
|
|