Commit 0d1abcc5 authored by David Reveman's avatar David Reveman Committed by Commit Bot

Change Picture: Request ideal size for camera stream.

Request an ideal video stream size that matches the capture size.
Improves capture quality and makes sure we handle cropping
correctly.

Bug: 
Test: No "Video capture size too small" messages is UI log.
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I72ee55a4599e71bd249df4ff0d8eda89b73a785c
Reviewed-on: https://chromium-review.googlesource.com/719158
Commit-Queue: David Reveman <reveman@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508939}
parent c5bbb481
......@@ -132,7 +132,12 @@ Polymer({
this.cameraStartInProgress_ = false;
}.bind(this);
navigator.webkitGetUserMedia({video: true}, successCallback, errorCallback);
var videoConstraints = {
width: {ideal: CAPTURE_SIZE.width},
height: {ideal: CAPTURE_SIZE.height},
};
navigator.webkitGetUserMedia(
{video: videoConstraints}, successCallback, errorCallback);
},
/** Stops the camera stream capture if it's currently active. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment