fix: remove image from cache after loading it in Mjpegstreamer.vue (#797)

This commit is contained in:
Stefan Dej authored and GitHub committed 2022-05-12 22:28:49 +02:00
1 parent 2f11dd1ed8
commit 05069ee43b
1 file changed
+2
+2
View File
@@ -150,6 +150,7 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
// we're done reading the jpeg. Time to render it.
else {
img.src = URL.createObjectURL(new Blob([imageBuffer], { type: TYPE_JPEG }))
img.onload = () => URL.revokeObjectURL(img.src)
frames++
contentLength = 0
bytesRead = 0
@@ -181,6 +182,7 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
}
stopStream() {
URL.revokeObjectURL(this.url)
if (this.timerFPS) clearTimeout(this.timerFPS)
if (this.timerRestart) clearTimeout(this.timerRestart)
this.controller?.abort()