From fdcb1b3d6f5b5e5f1bbac0640c8088366e574283 Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 27 Mar 2025 20:54:11 +0100 Subject: [PATCH] Make camera stream slightly more robust --- showbits-thermal-printer-ui/src/AppPhoto.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/showbits-thermal-printer-ui/src/AppPhoto.vue b/showbits-thermal-printer-ui/src/AppPhoto.vue index fd52684..3e1acb4 100644 --- a/showbits-thermal-printer-ui/src/AppPhoto.vue +++ b/showbits-thermal-printer-ui/src/AppPhoto.vue @@ -69,8 +69,11 @@ async function postImage(image: Blob | File) { } async function onGallery(file: File) { - await postImage(file); - await initStream(facing.value); + try { + await postImage(file); + } finally { + await initStream(facing.value); + } } async function onRecord() {