From 4d356df02afb1956b30ff226b478d7a7ef8e792d Mon Sep 17 00:00:00 2001 From: Justin Georgi Date: Thu, 7 Mar 2024 14:41:58 -0700 Subject: [PATCH] Add stop camera button Signed-off-by: Justin Georgi --- src/pages/detect.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pages/detect.vue b/src/pages/detect.vue index 1573741..6fd4bab 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -10,7 +10,7 @@
- Capture + Capture
@@ -41,9 +41,12 @@ - + + + + @@ -271,12 +274,12 @@ async selectImage (mode) { this.imageLoadMode = mode if (this.isCordova && mode == "camera") { - navigator.camera.getPicture(this.getImage, this.onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL, correctOrientation: true }); - return + navigator.camera.getPicture(this.getImage, this.onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL, correctOrientation: true }); + return } if (mode == "camera") { - this.videoAvailable = await this.openCamera() - if (this.videoAvailable) { return } + this.videoAvailable = await this.openCamera() + if (this.videoAvailable) { return } } this.$refs.image_chooser.click() },