diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php index 6657a38..5051b16 100644 --- a/resources/views/fields/camera-capture.blade.php +++ b/resources/views/fields/camera-capture.blade.php @@ -41,17 +41,43 @@ document.addEventListener('DOMContentLoaded', () => { -
+{{--
+ --}} + +
+ + + + + -
+ +{{-- +
Capture Retake Switch Camera Verify -
+
--}} +
+ Capture + Retake + Switch Camera + Verify +
+ + + + + {{-- --}} {{-- --}} @@ -185,8 +211,13 @@ document.addEventListener('DOMContentLoaded', () => { const snapshot = this.$refs.snapshot; const context = canvas.getContext('2d'); + canvas.width = video.videoWidth; + canvas.height = video.videoHeight; + context.drawImage(video, 0, 0, canvas.width, canvas.height); - const dataUrl = canvas.toDataURL('image/png'); + + //const dataUrl = canvas.toDataURL('image/png'); + const dataUrl = canvas.toDataURL('image/png', 1.0); if (this.stream) this.stream.getTracks().forEach(track => track.stop()); @@ -230,9 +261,6 @@ document.addEventListener('DOMContentLoaded', () => { } } } - - -