浏览代码

进入考试后摄像头初始化宽容设置

Michael Wang 6 年之前
父节点
当前提交
2405eb5a0c
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/features/OnlineExam/Examing/ExamingHome.vue

+ 5 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -136,7 +136,11 @@ export default {
 
       let initSnapshotTrialTimes = 0;
       this.initSnapInterval = setInterval(() => {
-        if (this.exam || initSnapshotTrialTimes > 12) {
+        if (
+          // 在数据取完,并且超过30秒后,摄像头必须工作正常才行。或者超过60秒后,直接抓拍。
+          (this.exam && initSnapshotTrialTimes > 5) ||
+          initSnapshotTrialTimes > 10
+        ) {
           clearInterval(this.initSnapInterval);
           this.serverLog(
             "debug/S-002001",