fix webcam performance

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej committed 2021-03-29 01:02:56 +02:00
1 parent 51dda65a6e
commit c6e6794f0a
1 file changed
+2 -1
+2 -1
View File
@@ -164,7 +164,8 @@
const timeout = Math.max(0, target_time - this.request_time)
this.$nextTick(() => {
setTimeout(this.requestMjpeg, timeout)
if (this.isVisible) setTimeout(this.requestMjpeg, timeout)
else setTimeout(this.requestMjpeg, 1000)
})
},
requestMjpeg() {