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 ec5012750d
commit ef373d77a2
2 changed files with 11 additions and 3 deletions

View File

@ -259,6 +259,14 @@ input::-webkit-inner-spin-button {
color: inherit; color: inherit;
} }
/* Barcodescanner Quagga */
#barcodescanner-livestream video {
width: 100%;
}
#barcodescanner-livestream canvas {
width: 100%;
}
/* Third party component customizations - Bootstrap */ /* Third party component customizations - Bootstrap */
/* Hide the form validation feedback icons introduced in Bootstrap 4.2.0 - a colored border is enough */ /* 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", type: "LiveStream",
target: document.querySelector("#barcodescanner-livestream"), target: document.querySelector("#barcodescanner-livestream"),
constraints: { constraints: {
width: 436, // width: 436,
height: 327, // height: 327,
facingMode: "environment" facingMode: "environment"
} }
}, },
@ -181,7 +181,7 @@ $(document).on("click", "#barcodescanner-start-button", function(e)
callback: function() callback: function()
{ {
Grocy.Components.BarcodeScanner.TorchState = !Grocy.Components.BarcodeScanner.TorchState; Grocy.Components.BarcodeScanner.TorchState = !Grocy.Components.BarcodeScanner.TorchState;
Quagga.CameraAccess.getActiveTrack().applyConstraints({ Quagga.CameraAccess.getActiveTrack().applyConstraints({
advanced: [ advanced: [
{ {