# What's New?

### 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 detected
* `SetFaceLostCallback(callback)` - Fires when a face is lost
* `IsFaceTracked()` - Check if face is currently tracked
* `GetFaceTrackingState()` - Get current state ('FOUND' or 'LOST')
* `RemoveFaceFoundCallback(callback)` / `RemoveFaceLostCallback(callback)` - Remove callbacks

**Usage:**

```javascript
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:**

```javascript
const info = WEBARSDK.GetTrackingStatus();

if (info) {
  console.log('Status:', info.status);        // "Tracking", "Anchoring", etc.
  console.log('State:', info.state);          // 0-3
  console.log('Is Tracking:', info.isTracking); // true/false
}
```

**Tracking States:**

* `0` - Idle
* `1` - Anchoring/Initialising
* `2` - 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.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blippar.com/webar-sdk/whats-new.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
