Skip to content

Commit

Permalink
cleanup: remove unused countdown offset
Browse files Browse the repository at this point in the history
Change-Id: Ic2d580eb08690d6175d04569c6534f7925f831fc
  • Loading branch information
andi34 committed Nov 9, 2023
1 parent dd7d60b commit 1075c12
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 37 deletions.
2 changes: 1 addition & 1 deletion assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ const photoBooth = (function () {
break;
}

const maxGetMediaRetry = countdownTime - (config.picture.cntdwn_offset + 1);
const maxGetMediaRetry = countdownTime - 1;
console.log(maxGetMediaRetry);
photoboothPreview.startVideo(CameraDisplayMode.COUNTDOWN, retry, maxGetMediaRetry);

Expand Down
10 changes: 3 additions & 7 deletions assets/js/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};

Expand Down
1 change: 0 additions & 1 deletion config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 0 additions & 5 deletions lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
11 changes: 0 additions & 11 deletions lib/configsetup.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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:",
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions resources/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 1075c12

Please sign in to comment.