Browse Source

检测 inputVideo 是否存在

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

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

@@ -873,6 +873,7 @@ export default {
       await new Promise(resolve => {
         const interval = setInterval(() => {
           if (
+            videoEl &&
             videoEl.readyState === 4 &&
             faceapi.nets.tinyFaceDetector.params &&
             faceapi.nets.faceExpressionNet.params