Index: ssts-web/src/main/webapp/disinfectsystem/test/takeVideoAndImg.js =================================================================== diff -u -r31041 -r31701 --- ssts-web/src/main/webapp/disinfectsystem/test/takeVideoAndImg.js (.../takeVideoAndImg.js) (revision 31041) +++ ssts-web/src/main/webapp/disinfectsystem/test/takeVideoAndImg.js (.../takeVideoAndImg.js) (revision 31701) @@ -199,17 +199,17 @@ * getUserMedia API说明: * 当请求包含一个ideal(应用最理想的)值时,这个值有着更高的权重,意味着浏览器会先尝试找到最接近指定的理想值的设定或者摄像头(如果设备拥有不止一个摄像头) */ - var canvasWidth = 3200; - var canvasHeight = 1800; + var canvasWidth = cameraWidth*2; + var canvasHeight = cameraHeight*2; canvasBig.setAttribute('width',canvasWidth); canvasBig.setAttribute('height',canvasHeight); var contextBig = canvasBig.getContext("2d"); var video = document.getElementById("video"); var videoObj = { video: { - width: { min: 720, ideal: canvasWidth, max: 4096 }, - height: { min: 480, ideal: canvasHeight, max: 2160 } + width: {min: 720, ideal: 1920, max: 4096}, + height: {min: 480, ideal: 1080, max: 2160} } } MediaUtils.getUserMedia(videoObj, false, function (err, stream) { @@ -232,7 +232,6 @@ }); return; } - if ($("#takePhotos").prop("checked")) {//拍图片 /*拍图片的下滑效果 */ $("#canvas").removeClass("animate-bounce-up");