Skip to content

Commit

Permalink
core: respect kill preview config trying to get a preview
Browse files Browse the repository at this point in the history
Change-Id: I48d5594a8c37483fa9106bb03e2cd28409fe7fea
  • Loading branch information
andi34 committed Nov 13, 2023
1 parent b619a0f commit 78473d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,10 @@ 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)) > 0 ? countdownTime - parseInt(config.preview.stop_time, 10) : countdownTime;
}
photoboothPreview.startVideo(CameraDisplayMode.COUNTDOWN, retry, maxGetMediaRetry);

if (
Expand Down

0 comments on commit 78473d3

Please sign in to comment.