in source/client/src/liveness/nose/NoseChallengeProcessor.ts [98:116]
private process(): any {
LogUtils.debug("video event handler");
if (this.cameraVideoElement.paused || this.cameraVideoElement.ended) {
LogUtils.debug("video paused or ended");
return setTimeout(() => this.process(), 10);
}
const options = new faceapi.TinyFaceDetectorOptions();
faceapi
.detectAllFaces(this.cameraVideoElement, options)
.withFaceLandmarks(false)
.then((result: faceapi.WithFaceLandmarks<{ detection: faceapi.FaceDetection }, faceapi.FaceLandmarks68>[]) => {
if (result) {
this.processDetectionResults(result);
} else {
setTimeout(() => this.process());
}
return result;
});
}