What's New?
WebAR SDK v2.1.0
WebAR SDK v2.1.0
Release Date: January 2026
New Features
Face Tracking Lifecycle Callbacks
Monitor face detection state in real-time with new callback APIs.
New APIs:
SetFaceFoundCallback(callback)- Fires when a face is detectedSetFaceLostCallback(callback)- Fires when a face is lostIsFaceTracked()- Check if face is currently trackedGetFaceTrackingState()- Get current state ('FOUND' or 'LOST')RemoveFaceFoundCallback(callback)/RemoveFaceLostCallback(callback)- Remove callbacks
Usage:
WEBARSDK.SetFaceFoundCallback((faceInfo) => {
console.log('Face detected!');
showARContent();
});
WEBARSDK.SetFaceLostCallback(() => {
console.log('Face lost!');
hideARContent();
});
if (WEBARSDK.IsFaceTracked()) {
// Face is currently visible
}Key Features:
Callbacks fire on state transitions (not every frame)
Built-in debouncing to prevent flickering
Access to face position, rotation, scale, and mouth openness
Late registration support - callbacks fire immediately if face already tracked
Tracking Status API (Surface & World Tracking)
Query the current tracking state for Surface and World Tracking modes.
New API:
GetTrackingStatus()- Returns current tracking state
Usage:
Tracking States:
0- Idle1- Anchoring/Initialising2- Tracking (active)3- Relocalising
Bug Fixes & Improvements
Windows Touchscreen Laptop Detection
Fixed device detection for Windows touchscreen laptops (Microsoft Surface Pro, Surface Laptop, etc.). These devices are now correctly identified as desktop devices, preventing unwanted motion sensor permission prompts.
CSS Framework Compatibility (Face Tracking)
Fixed face tracking compatibility with CSS frameworks like Tailwind and Bootstrap. The SDK now properly handles aspect ratio constraints, preventing horizontally stretched faces and improving tracking accuracy.
Gyro Initialization
Improved gyro sensor initialization for more reliable tracking startup.
Last updated