Skip to main content

MonitorDog Web SDK v1.0.16: Improved Pose Tracking and Camera Error Handling

|
3 min read
MonitorDog Team
AI-Powered Visual Hacking Protection Solution
Web SDK Update

This update note covers MonitorDog Web SDK v1.0.16.

Person-detection stability and integration usability have been improved.

This release adds MediaPipe Pose tracking, organizes detection results around person-related fields, and provides more specific errors when a camera cannot be opened.

Key Updates

Web SDK v1.0.16 Changes

Pose Tracking: MediaPipe Pose supplements user tracking and improves detection stability.
Detection Result API: User presence and count are now provided through personDetected and personCount.
Specific Camera Errors: Camera-in-use, device-not-found, permission-denied, and other startup failures now have specific error codes.
Runtime Stability: Invalid video frame handling, initial model preparation, MediaPipe asset paths, and execution fallback behavior have been improved.

Details

1. MediaPipe Pose User Tracking

MediaPipe Pose tracking has been added alongside the existing face and phone detection. Pose tracking helps determine whether a user is present more reliably when the user's face is temporarily unclear.

Detailed Pose state is available in poseTracking. Bounding boxes and landmark coordinates are also provided for inspecting detection state and troubleshooting, rather than for general screen-blocking logic.

2. Person-Oriented Detection Result API

The user-related fields in onDetect have changed as follows.

Previous fieldv1.0.16 field
faceDetectedpersonDetected
faceCountpersonCount

Use personDetected and personCount for general person-presence and count logic. Detailed face detection results remain available in faceDetections.

onDetect: (result) => {
if (!result.personDetected) {
showWarning("The user is not visible.");
}

if (result.personCount >= 2) {
blockScreen("Multiple users have been detected.");
}
};
Integration code must be updated.

Code using faceDetected or faceCount in v1.0.15 must be changed to personDetected and personCount for v1.0.16.

3. Improved Camera Startup Errors

Camera startup failures are delivered as MonitorDogSdkError with a specific code for each situation. This includes cases where another application or browser tab may already be using the camera.

  • CAMERA_PERMISSION_DENIED
  • CAMERA_NOT_FOUND
  • CAMERA_IN_USE
  • CAMERA_CONSTRAINT_FAILED
  • CAMERA_REQUEST_TIMEOUT
  • CAMERA_UNSUPPORTED
  • CAMERA_READ_FAILED

The original browser error is available in cause.

import { MonitorDogSdkError } from "@monitordog/detector";

onError: (error) => {
if (error instanceof MonitorDogSdkError) {
console.error(error.code, error.message, error.cause);
}
};

How to Update

Update the package in npm-based projects.

npm install @monitordog/detector@1.0.16

For static zip deployments, redeploy the entire monitordog/ folder from the v1.0.16 archive. This release adds the Pose model and WebAssembly runtime under assets/mediapipe/, so replacing only the existing UMD script may prevent the SDK from working correctly.

When serving static assets directly, configure the .task extension with the application/octet-stream MIME type.

Update Checklist

  • Replace faceDetected with personDetected.
  • Replace faceCount with personCount.
  • Replace the entire monitordog/ folder when using the static zip.
  • Serve .task files with the correct MIME type.
  • Handle the specific camera error codes in onError.

Update to Web SDK v1.0.16

See the Web SDK integration guide for the updated detection result API and installation instructions.