WebView / native messages

Message types emitted by Upload Tracking and when they fire.

Upload Tracking emits structured messages so the host app can react.

Transport depends on your integration.

In a browser iframe, it’s postMessage.

In mobile apps, it’s your WebView bridge.

Some bridges stringify the payload. Handle both forms.

Typical V3 flow (Upload Tracking)

Video (source=video)

  1. initialization while the page and video load.

  2. posture until the exercise is ready.

  3. During playback:

    • counter

    • optional form_score, progression, recommendations

    • optional keypoints / angles

  4. End of video:

    • counter with final=true

    • optional keypoints_batch (if enabled)

    • optional export_ready (if export=true)

Image (source=image)

  1. initialization while the image loads.

  2. Optional keypoints / angles.

  3. image_overlay with a base64 overlay image.

Message types

initialization (video + image)

Fields:

  • type (string) β€” "initialization".

  • message (string) β€” status.

  • ready (boolean) β€” true when analysis can run.

  • source (string, optional) β€” "video" or "image".

Example:

environment (video + image)

Sent after backend init.

Fields:

  • type (string) β€” "environment".

  • poseBackend (string) β€” "webgl" or "wasm".

  • webgl (boolean) β€” whether WebGL is available.

Example:

error (video + image)

Fields:

  • type (string) β€” "error".

  • code (string) β€” machine-readable error code.

  • message (string) β€” human-readable description.

  • details (object, optional).

Example:

Common codes you should handle:

  • missing_token

  • invalid_token

  • invalid_exercise (video only)

  • developer_features_not_allowed

  • video_load_error

  • image_load_error

  • media_decode_error

  • cross_origin_video

  • cross_origin_image

  • webgl_unavailable

  • jump_analysis_missing_height (for exercise=jump_analysis)

Video-only messages (source=video)

posture

Same meaning as Tracking placement.

counter

Fields:

  • type (string) β€” "counter".

  • current_count (number) β€” reps or seconds.

  • final (boolean, optional) β€” true at end-of-video.

form_score (optional)

progression (plan-gated)

recommendations (plan-gated)

keypoints (plan-gated)

angles (plan-gated)

keypoints_batch (plan-gated)

Sent near the end of a video analysis.

It contains time-stamped keypoints for the whole clip.

Fields:

  • type (string) β€” "keypoints_batch".

  • fps (number) β€” sampling rate.

  • frames (array<object>) β€” per-frame keypoints.

Example (truncated):

export_ready (plan-gated, export=true)

Sent when export finishes.

Fields:

  • type (string) β€” "export_ready".

  • url (string) β€” a downloadable URL.

  • mimeType (string, optional) β€” example: "video/mp4".

Example:

Jump messages (video, custom exercises)

These fire only for:

  • exercise=jump_analysis

  • exercise=air_time_jump

They can be emitted during analysis.

They are identical to the real-time message types.

jump_calibration (jump_analysis only)

jump_started

jump_discarded

jump_height

jump_summary

Sent near the end of a video analysis.

Image-only messages (source=image)

image_overlay

Sent after processing completes.

Fields:

  • type (string) β€” "image_overlay".

  • dataUrl (string) β€” base64 PNG or JPEG.

keypoints and angles (plan-gated)

For images, these are emitted once.

Last updated