소스 검색

fix 高清摄像头的显示比例

Michael Wang 5 년 전
부모
커밋
7a2c0a4344
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/components/FaceRecognition/FaceRecognition.vue

+ 1 - 0
src/components/FaceRecognition/FaceRecognition.vue

@@ -101,6 +101,7 @@ export default {
           const stream = await navigator.mediaDevices.getUserMedia({
             video: {
               facingMode: "user",
+              aspectRatio: 4 / 3,
               // width: 400,
               // height: this.showRecognizeButton ? 300 : 250
             },