Fix tensor cleanup and orphan event listener (#171)
Closes: #166 Signed-off-by: Justin Georgi <justin.georgi@gmail.com> Reviewed-on: #171
This commit is contained in:
@@ -25,12 +25,14 @@ export default {
|
||||
},
|
||||
closeCamera () {
|
||||
this.cameraStream.getTracks().forEach( t => t.stop())
|
||||
this.cameraStream = null
|
||||
this.videoAvailable = false
|
||||
},
|
||||
captureVidFrame() {
|
||||
const vidViewer = this.$refs.vid_viewer
|
||||
vidViewer.pause()
|
||||
let tempCVS = document.createElement('canvas')
|
||||
tempCVS.id = 'temp-video-canvas'
|
||||
tempCVS.height = vidViewer.videoHeight || parseInt(vidViewer.style.height)
|
||||
tempCVS.width = vidViewer.videoWidth || parseInt(vidViewer.style.width)
|
||||
const tempCtx = tempCVS.getContext('2d')
|
||||
|
||||
Reference in New Issue
Block a user