Fixed live counter not updating correctly
This commit is contained in:
parent
6a96ef55c0
commit
206ef4c503
1 changed files with 7 additions and 1 deletions
|
@ -177,7 +177,13 @@ export default {
|
||||||
this.$router.push("/record/" + id);
|
this.$router.push("/record/" + id);
|
||||||
},
|
},
|
||||||
increaseTimer: function() {
|
increaseTimer: function() {
|
||||||
this.timerDelta++;
|
if (this.records.length <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var record = this.records[0];
|
||||||
|
var liveDuration = (new Date().getTime() - new Date(record.start_time).getTime()) / 1000;
|
||||||
|
this.timerDelta = liveDuration - record.duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue