|
@@ -184,13 +184,16 @@ export default {
|
|
(!result || result.length !== 1) &&
|
|
(!result || result.length !== 1) &&
|
|
!videoEl.classList.contains("video-warning")
|
|
!videoEl.classList.contains("video-warning")
|
|
) {
|
|
) {
|
|
- videoEl.classList.add("video-warning");
|
|
|
|
- this.warningTimeout = setTimeout(function() {
|
|
|
|
- videoEl.classList.remove("video-warning");
|
|
|
|
- }, 3000);
|
|
|
|
|
|
+ this.findFirst = !this.findFirst; // 两次才告警
|
|
|
|
+ if (!this.findFirst) {
|
|
|
|
+ videoEl.classList.add("video-warning");
|
|
|
|
+ this.warningTimeout = setTimeout(function() {
|
|
|
|
+ videoEl.classList.remove("video-warning");
|
|
|
|
+ }, 3000);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- this.detectFacesTimeout = setTimeout(() => this.detectFaces(), 5000);
|
|
|
|
|
|
+ this.detectFacesTimeout = setTimeout(() => this.detectFaces(), 10 * 1000);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|