Alarm No Face

Analyzes alarm no face in a video stream. The event listener keeps getting data in a JSON object as FaceAI keeps analyzing alarm no face.

Method

To analyze alarm no face in a video stream.

Method: EnxFaceAI.startAlarmNoFace(callback)

Parameter

  • callback: Callback to know that processing request has been accepted.

Event Listener

  • alarm-no-face: This event notification is received repeatedly with the Alarm No Face Analysis report as a JSON object.

JSON Object: Received with Alarm No Face Analysis data.

{ output: {
noFace: Boolean
}
}

Analysis Data Explanation

  • output: Alarm No Face Report
    • noFace: Boolean. It is true when the alarm is ON, false otherwise.

Sample Code

// Start Alarm No Face
faceAI.startAlarmNoFace((res) => {
if (res.result === 0) {
window.addEventListener("alarm-no-face", (evt) => {
console.log(evt.detail, "alarm-no-face");
});
}
});