Fix image cropping and submission for photo ID verify.

Using the available video resolution increasing the image and request
size and server started failing requests. Fixed it by using canvas
width and height.

PROD-499
This commit is contained in:
Waheed Ahmed
2019-07-29 16:49:40 +05:00
parent d5d10942b1
commit 557213acc1

View File

@@ -55,9 +55,7 @@
if (this.stream) {
video = this.getVideo();
canvas = this.getCanvas();
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
canvas.getContext('2d').drawImage(video, 0, 0);
canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
video.pause();
return true;
}