From 0587b70a91137b1ecf059609e07c5a17fc9eb4d7 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Thu, 9 Nov 2023 20:57:50 +0100 Subject: [PATCH] core: respect kill preview config trying to get a preview Change-Id: I48d5594a8c37483fa9106bb03e2cd28409fe7fea --- assets/js/core.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/js/core.js b/assets/js/core.js index 37b00dd4e..53cda36d9 100644 --- a/assets/js/core.js +++ b/assets/js/core.js @@ -416,8 +416,12 @@ const photoBooth = (function () { break; } - const maxGetMediaRetry = countdownTime - 1; - console.log(maxGetMediaRetry); + let maxGetMediaRetry = countdownTime - 1; +if (config.preview.killcmd && countdownTime > 0) { +maxGetMediaRetry = countdownTime > parseInt(config.preview.stop_time, 10) + ? countdownTime - parseInt(config.preview.stop_time, 10) + : countdownTime; +} photoboothPreview.startVideo(CameraDisplayMode.COUNTDOWN, retry, maxGetMediaRetry); if (