Browse Source

electron getUserMedia bug

Michael Wang 6 years ago
parent
commit
59c13090bd

+ 3 - 3
src/components/FaceRecognition/FaceRecognition.vue

@@ -59,9 +59,9 @@ export default {
           console.log("启动摄像头");
           console.log("启动摄像头");
           const stream = await navigator.mediaDevices.getUserMedia({
           const stream = await navigator.mediaDevices.getUserMedia({
             video: {
             video: {
-              facingMode: "user",
-              width: 400,
-              height: this.showRecognizeButton ? 300 : 250
+              facingMode: "user"
+              // width: 400,
+              // height: this.showRecognizeButton ? 300 : 250
             }
             }
           });
           });
 
 

+ 4 - 0
src/features/OnlineExam/Examing/QuestionBody.vue

@@ -8,6 +8,10 @@
         audioPlayTimes[index]}})</span><br />
         audioPlayTimes[index]}})</span><br />
     </div>
     </div>
   </div>
   </div>
+
+  <div v-else>
+    获取试题中...
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>