Don't exceed the screen width with camera window

This commit is contained in:
Michael Neuendorf 2020-03-24 20:16:30 +01:00
parent a477902752
commit d17a573cbe
2 changed files with 11 additions and 3 deletions

View File

@ -259,6 +259,14 @@ input::-webkit-inner-spin-button {
color: inherit;
}
/* Barcodescanner Quagga */
#barcodescanner-livestream video {
width: 100%;
}
#barcodescanner-livestream canvas {
width: 100%;
}
/* Third party component customizations - Bootstrap */
/* Hide the form validation feedback icons introduced in Bootstrap 4.2.0 - a colored border is enough */

View File

@ -28,8 +28,8 @@ Grocy.Components.BarcodeScanner.StartScanning = function()
type: "LiveStream",
target: document.querySelector("#barcodescanner-livestream"),
constraints: {
width: 436,
height: 327,
// width: 436,
// height: 327,
facingMode: "environment"
}
},
@ -181,7 +181,7 @@ $(document).on("click", "#barcodescanner-start-button", function(e)
callback: function()
{
Grocy.Components.BarcodeScanner.TorchState = !Grocy.Components.BarcodeScanner.TorchState;
Quagga.CameraAccess.getActiveTrack().applyConstraints({
advanced: [
{