fix: don't createObjectURL, when webcam img doesn't exist in Mjpegstreamer.vue (#834)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
cc888a3924
commit
fd89ff7ba3
@ -148,8 +148,12 @@ 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 }))
|
||||
if (img) {
|
||||
img.src = URL.createObjectURL(
|
||||
new Blob([imageBuffer], { type: TYPE_JPEG })
|
||||
)
|
||||
img.onload = () => URL.revokeObjectURL(img.src)
|
||||
}
|
||||
frames++
|
||||
contentLength = 0
|
||||
bytesRead = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user