diff --git a/assets/js/core.js b/assets/js/core.js index 87907125a..40c357f53 100644 --- a/assets/js/core.js +++ b/assets/js/core.js @@ -416,8 +416,10 @@ const photoBooth = (function () { break; } - const maxGetMediaRetry = countdownTime - (config.picture.cntdwn_offset + 1); - console.log(maxGetMediaRetry); + let maxGetMediaRetry = Math.max(countdownTime - 1, 0); + if (config.preview.killcmd && maxGetMediaRetry > 0) { + maxGetMediaRetry = Math.max(countdownTime - parseInt(config.preview.stop_time, 10), 0); + } photoboothPreview.startVideo(CameraDisplayMode.COUNTDOWN, retry, maxGetMediaRetry); if ( diff --git a/assets/js/preview.js b/assets/js/preview.js index fa64b09da..08c71a24a 100644 --- a/assets/js/preview.js +++ b/assets/js/preview.js @@ -186,14 +186,10 @@ const photoboothPreview = (function () { api.runCmd('stop'); } if (config.preview.mode === PreviewMode.DEVICE.valueOf()) { - setTimeout(function () { - api.stopVideo(); - }, config.picture.cntdwn_offset * 1000); + api.stopVideo(); } else if (config.preview.mode === PreviewMode.URL.valueOf()) { - setTimeout(function () { - url.removeClass('streaming'); - url.hide(); - }, config.picture.cntdwn_offset * 1000); + url.removeClass('streaming'); + url.hide(); } }; diff --git a/config/config.inc.php b/config/config.inc.php index 0d742751f..9d03bed2d 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -60,7 +60,6 @@ $config['picture']['enabled'] = true; // control countdown timer in seconds $config['picture']['cntdwn_time'] = '5'; -$config['picture']['cntdwn_offset'] = '0'; // control time for cheeeeese! in milliseconds $config['picture']['cheese_time'] = '1000'; // possible flip values: 'off', 'horizontal', 'vertical', 'both' diff --git a/lib/config.php b/lib/config.php index deca619e7..4d98aafbc 100644 --- a/lib/config.php +++ b/lib/config.php @@ -164,11 +164,6 @@ $config['preview']['mode'] = 'device_cam'; } -// Preview need to be stopped before we can take an image -if (!empty($config['preview']['killcmd']) && $config['preview']['stop_time'] < $config['picture']['cntdwn_offset']) { - $config['preview']['stop_time'] = $config['picture']['cntdwn_offset'] + 1; -} - $default_font = PathUtility::getPublicPath('resources/fonts/GreatVibes-Regular.ttf'); $default_frame = PathUtility::getPublicPath('resources/img/frames/frame.png'); $random_frame = PathUtility::getPublicPath('api/randomImg.php?dir=demoframes'); diff --git a/lib/configsetup.inc.php b/lib/configsetup.inc.php index 207e5bcd5..a7e309123 100644 --- a/lib/configsetup.inc.php +++ b/lib/configsetup.inc.php @@ -455,17 +455,6 @@ 'range_step' => 1, 'unit' => 'seconds', ], - 'picture_cntdwn_offset' => [ - 'view' => 'advanced', - 'type' => 'range', - 'name' => 'picture[cntdwn_offset]', - 'placeholder' => $defaultConfig['picture']['cntdwn_offset'], - 'value' => $config['picture']['cntdwn_offset'], - 'range_min' => 0, - 'range_max' => 10, - 'range_step' => 1, - 'unit' => 'seconds', - ], 'picture_cheese_time' => [ 'view' => 'advanced', 'type' => 'range', diff --git a/resources/lang/de.json b/resources/lang/de.json index 30fe12fe5..0c787e135 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -427,7 +427,6 @@ "manual:pictures:filters_enabled": "Wenn diese Option aktiviert ist, kann der Benutzer nach dem Aufnehmen eines Bildes einen Bildfilter auswählen.", "manual:pictures:picture_allow_delete": "Wenn diese Option aktiviert ist, können Bilder direkt nach der Aufnahme auf der Ergebnisseite gelöscht werden.", "manual:pictures:picture_cheese_time": "Legen Sie eine Zeit fest zur Anzeige von \"Cheeeeeeeese!\" nach dem Countdown.", - "manual:pictures:picture_cntdwn_offset": "Stellen Sie einen Versatz auf den Countdown ein, um die Verzögerung durch die Cheeese-Zeit, Fokussierung und Verschlusszeit zu kompensieren.", "manual:pictures:picture_cntdwn_time": "Legen Sie Ihre Countdown-Zeit fest.", "manual:pictures:picture_extend_by_frame": "Wenn aktiviert, wird der Rahmen nicht als Overlay auf das Bild gelegt sodern das Bild wird um den Rahmen erweitert. So bleibt das gesamte Foto sichtbar, es wird nichts verdeckt.", "manual:pictures:picture_flip": "Wählen Sie, ob Ihr Bild nach der Aufnahme gespiegelt wird.", @@ -580,7 +579,6 @@ "pictures:filters_enabled": "Bildfilter erlauben", "pictures:picture_allow_delete": "Löschen des Bildes erlauben", "pictures:picture_cheese_time": "Lächeln Timer:", - "pictures:picture_cntdwn_offset": "Countdown-Versatz:", "pictures:picture_cntdwn_time": "Countdown Timer:", "pictures:picture_extend_by_frame": "Erweitere das Bild um den Rahmen", "pictures:picture_flip": "Bild spiegeln:", diff --git a/resources/lang/en.json b/resources/lang/en.json index aa8e97153..358060969 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -447,7 +447,6 @@ "manual:pictures:filters_enabled": "If enabled, user can choose an imagefiler after taking a picture.", "manual:pictures:picture_allow_delete": "If enabled pictures can be deleted on result page directly after they have been taken.", "manual:pictures:picture_cheese_time": "Set a time to display \"Cheeeeeeeese!\" after the countdown.", - "manual:pictures:picture_cntdwn_offset": "Set an offset to the countdown to compensate the delay because of cheese time, focus and shutter speed.", "manual:pictures:picture_cntdwn_time": "Set your countdown time.", "manual:pictures:picture_enabled": "If enabled, the take picture button is visible and it's possible to take a picture.", "manual:pictures:picture_extend_by_frame": "If enabled, the applied frame is not added as an overlay but the picture is extended by the frame", @@ -690,7 +689,6 @@ "pictures:filters_enabled": "Allow image filter", "pictures:picture_allow_delete": "Allow deletion of the image", "pictures:picture_cheese_time": "Cheese timer:", - "pictures:picture_cntdwn_offset": "Countdown offset:", "pictures:picture_cntdwn_time": "Countdown timer:", "pictures:picture_enabled": "Allow photo", "pictures:picture_extend_by_frame": "Extend the picture by the frame", diff --git a/resources/lang/es.json b/resources/lang/es.json index 59e28d3ea..443782a16 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -447,7 +447,6 @@ "manual:pictures:filters_enabled": "Si está habilitado, el usuario puede elegir un imagefiler después de tomar una foto.", "manual:pictures:picture_allow_delete": "Si está activada, las imagenes pueden eliminarse en la página de resultados directamente después de haber sido tomadas.", "manual:pictures:picture_cheese_time": "Establezca una hora para mostrar \"¡Patataaaaaas!\" después de la cuenta regresiva.", - "manual:pictures:picture_cntdwn_offset": "Ajuste un desplazamiento a la cuenta atrás para compensar el retardo debido al tiempo de captura, al enfoque y a la velocidad de obturación.", "manual:pictures:picture_cntdwn_time": "Establezca el tiempo de cuenta regresiva.", "manual:pictures:picture_enabled": "Si está activado, el botón tomar foto es visible y es posible tomar una foto.", "manual:pictures:picture_extend_by_frame": "Si se activa, el fotograma aplicado no se añade como superposición, pero la imagen se extiende por el fotograma", @@ -688,7 +687,6 @@ "pictures:filters_enabled": "Autorice el tratamiento de imagen", "pictures:picture_allow_delete": "Permitir la eliminación de la imagen", "pictures:picture_cheese_time": "Temporizador de \"Patata\":", - "pictures:picture_cntdwn_offset": "Compensación de la cuenta atrás:", "pictures:picture_cntdwn_time": "Cuenta regresiva en segundos", "pictures:picture_enabled": "Permitir foto", "pictures:picture_extend_by_frame": "Extender la imagen por fotograma", diff --git a/resources/lang/fr.json b/resources/lang/fr.json index ad7964a40..8fc8da448 100644 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -418,7 +418,6 @@ "manual:pictures:filters_disabled": "Choisissez les filtres qui sont retirés des filtres photo disponibles.", "manual:pictures:picture_allow_delete": "Si activé, les photos peuvent être supprimées sur la page de résultat directement après avoir été prises.", "manual:pictures:picture_cheese_time": "Définissez un temps pour afficher \"Cheeeeeeeeeeeeese\" après le compte à rebours.", - "manual:pictures:picture_cntdwn_offset": "Définissez un décalage sur le compte à rebours pour compenser le retard en raison du temps du \"Souriez !\", du focus et de la vitesse d'obturation.", "manual:pictures:picture_cntdwn_time": "Définissez votre temps de compte à rebours.", "manual:pictures:picture_flip": "Choisissez si votre photo est retournée après avoir été prise.", "manual:pictures:picture_frame": "Entrez le chemin d'accès du cadre qui sera appliqué à votre photo après la prise.", @@ -616,7 +615,6 @@ "pictures:filters_disabled": "Filtres désactivés", "pictures:filters_enabled": "Autorisez le filtre d'image", "pictures:picture_allow_delete": "Autoriser la suppression de l'image", - "pictures:picture_cntdwn_offset": "Décalage du compte à rebours :", "pictures:picture_cntdwn_time": "Compte à rebours en secondes", "pictures:picture_enabled": "Autoriser les photos", "pictures:picture_extend_by_frame": "Étendre l'image au cadre", diff --git a/resources/lang/it.json b/resources/lang/it.json index 91568cd31..931b8a4f5 100644 --- a/resources/lang/it.json +++ b/resources/lang/it.json @@ -446,7 +446,6 @@ "manual:pictures:filters_enabled": "Se abilitato, l'utente può scegliere di applicare un filtro all'immagine dopo lo scatto.", "manual:pictures:picture_allow_delete": "Se abilitate, le immagini possono essere cancellate sulla pagina dei risultati direttamente dopo che sono state scattate.", "manual:pictures:picture_cheese_time": "Imposta il tempo di visualizzazione di \"Cheeeeeeeese!\" dopo il conto alla rovescia.", - "manual:pictures:picture_cntdwn_offset": "Impostare un offset al conto alla rovescia per compensare il ritardo a causa del tempo del cheese, messa a fuoco e la velocità dell'otturatore.", "manual:pictures:picture_cntdwn_time": "Imposta il tuo tempo di conto alla rovescia.", "manual:pictures:picture_enabled": "Se abilitato, il pulsante per scattare una foto sarà visibile e sarà possibile scattare una foto.", "manual:pictures:picture_extend_by_frame": "Se abilitata, la cornice non viene sovrapposta all'immagine ma l'immagine viene estesa dalla cornice", @@ -646,7 +645,6 @@ "pictures:filters_enabled": "Consenti filtro immagine", "pictures:picture_allow_delete": "Permetti l'eliminazione delle immagini", "pictures:picture_cheese_time": "Timer cheese:", - "pictures:picture_cntdwn_offset": "Offset del conto alla rovescia:", "pictures:picture_cntdwn_time": "Timer conto alla rovescia:", "pictures:picture_enabled": "Consenti le foto", "pictures:picture_extend_by_frame": "Estendi l'immagine con la cornice", diff --git a/resources/lang/nl.json b/resources/lang/nl.json index f79ae72e0..198920938 100644 --- a/resources/lang/nl.json +++ b/resources/lang/nl.json @@ -447,7 +447,6 @@ "manual:pictures:filters_enabled": "Indien ingeschakeld, kan de gebruiker na het maken van een foto een beeldfilter kiezen.", "manual:pictures:picture_allow_delete": "Indien ingeschakeld, kunnen afbeeldingen direct na het maken ervan op de resultatenpagina worden verwijderd.", "manual:pictures:picture_cheese_time": "Stel een tijd in om \"Cheeeeeeeese!\" weer te geven na het aftellen.", - "manual:pictures:picture_cntdwn_offset": "Stel een offset in voor het aftellen om de vertraging als gevolg van de tijd voor \"Cheeeeeeeese!\", focus en sluitertijd te compenseren.", "manual:pictures:picture_cntdwn_time": "Stel uw afteltijd in.", "manual:pictures:picture_enabled": "Indien ingeschakeld, is de knop 'foto maken' zichtbaar en is het mogelijk om een foto te maken.", "manual:pictures:picture_extend_by_frame": "Indien ingeschakeld, wordt het toegepaste kader niet toegevoegd als overlay, maar wordt de afbeelding uitgebreid met het kader", @@ -690,7 +689,6 @@ "pictures:filters_enabled": "Toestaan beeldfilter", "pictures:picture_allow_delete": "Toestaan verwijdering van de foto", "pictures:picture_cheese_time": "Cheese-timer:", - "pictures:picture_cntdwn_offset": "Afteloffset:", "pictures:picture_cntdwn_time": "Afteltimer:", "pictures:picture_enabled": "Toestaan foto", "pictures:picture_extend_by_frame": "De foto uitbreiden met het frame",