|
|
|
|
@ -38,7 +38,8 @@
|
|
|
|
|
manualMinutes:0,
|
|
|
|
|
manualSeconds:0,
|
|
|
|
|
analyser:null,
|
|
|
|
|
secondsToSubtract:0
|
|
|
|
|
secondsToSubtract:0,
|
|
|
|
|
micThreshold:0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -78,7 +79,7 @@
|
|
|
|
|
const arraySum = array.reduce((a, value) => a + value, 0);
|
|
|
|
|
const micLevel = arraySum / array.length;
|
|
|
|
|
|
|
|
|
|
if(micLevel < 50){
|
|
|
|
|
if(micLevel < this.micThreshold){
|
|
|
|
|
this.secondsToSubtract++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -141,6 +142,7 @@
|
|
|
|
|
<em>
|
|
|
|
|
{{formatTime(totalSeconds)}}
|
|
|
|
|
</em>
|
|
|
|
|
Mic Threshold: <input type="number" v-model="micThreshold"/>
|
|
|
|
|
<button :disabled="running" @click="start">Start</button>
|
|
|
|
|
<button :disabled="!running" @click="stop">Stop</button>
|
|
|
|
|
<button :disabled="running || totalSeconds === 0" @click="reset">Reset</button>
|
|
|
|
|
|