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 9, 2023
1 parent 1075c12 commit bc6143f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) > 0
? countdownTime - parseInt(config.preview.stop_time, 10)
: countdownTime;
}
photoboothPreview.startVideo(CameraDisplayMode.COUNTDOWN, retry, maxGetMediaRetry);

if (
Expand Down

0 comments on commit bc6143f

Please sign in to comment.