Skip to main content
Two listening styles (pick one). Typed callbacks are recommended for new apps.
Imperative: client.addEventListener / client.addMessageListener.

Keypoints-only (no API token)

Business events need full-engine + feature flags.

Full-engine callbacks

Outside an exercise session, pose-only keypoints always stream (free). During an exercise, keypoints need features.keypoints + a paid plan.

Key shapes

KeypointsEvent

Classic onMessage: joints in data instead of keypoints.

InitializationEvent

Camera boot sequence (classic messages): accessing webcamloading pose modelrunning (ready: true).

CounterEvent / form grades

minGrade (A–D): reps below the bar are not counted (no counter / form_score, excluded from summary).

QualityChangedEvent

previousProfile, activeProfile, reason (low_fps | device_capability | crash_guard | warmup_estimate | manual), detail, optional estimatedFps / medianInferenceMs.

PerformanceWarningEvent

code: 'device_too_slow', meanFps, thresholdFps, activeProfile, message (English, for developers — localize before showing end users).

Error codes

Messages for plan gating match the PoseTracker WebView product strings.

HUD vs your UI

The in-page yellow debug HUD is not your app’s event stream. Drive UI from usePoseTracker / listeners only.