Stop video when frame selected

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-03-03 16:32:46 -07:00
parent 9f47f56062
commit b9d1b5c5ff

View File

@@ -546,6 +546,7 @@
getImage (searchImage) { getImage (searchImage) {
let loadImage = new Promise(resolve => { let loadImage = new Promise(resolve => {
if (this.videoAvailable) { if (this.videoAvailable) {
this.cameraStream.getTracks().forEach( t => t.stop())
this.videoAvailable = false this.videoAvailable = false
resolve(searchImage) resolve(searchImage)
} else if (this.isCordova && this.imageLoadMode == "camera") { } else if (this.isCordova && this.imageLoadMode == "camera") {