diff --git a/public/js/marhun-photo-capture.js b/public/js/marhun-photo-capture.js index 32d01223..6923f693 100644 --- a/public/js/marhun-photo-capture.js +++ b/public/js/marhun-photo-capture.js @@ -95,7 +95,6 @@ function marhunPhotoCapturerFactory(modal_selector) { let enumerateDevices = () => navigator.mediaDevices.enumerateDevices() .then(devices => devices.filter(x => x.kind === 'videoinput')) - .then(x => {console.log; return x;}); getUserMedia(); @@ -159,8 +158,9 @@ function marhunPhotoCapturerFactory(modal_selector) { function composeConstraint(camera) { let constraints = { - width: { exact: 3200 }, - height: { exact: 1800 }, + width: { min: 1280, max: 3200 }, + height: { min: 720, max: 1800 }, + aspectRatio: {exact: 1.7777777778}, }; if (camera.deviceId !== '') { @@ -198,6 +198,7 @@ function marhunPhotoCapturerFactory(modal_selector) { } function streamCameraView(stream) { + console.log(stream.getVideoTracks()[0].getSettings()) let modal = document.querySelector(modal_selector); let videoTagPreview = modal.querySelector('.video-tag-overallmarhun.video-preview'); let videoTagData = modal.querySelector('.video-tag-overallmarhun.video-data');