Browse Source

定时器清理

Michael Wang 5 năm trước cách đây
mục cha
commit
9e97d9540c
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue

+ 3 - 0
src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue

@@ -867,6 +867,9 @@ export default {
             resolve();
             clearInterval(interval);
           }
+          if (document.getElementById("inputVideo") === null) {
+            clearInterval(interval);
+          }
         }, 300);
       });
       console.log(videoEl.readyState, faceapi.nets.tinyFaceDetector.params);