Camera & Pose Detection
Fine-tune the camera and pose detection system. These parameters affect any view that runs the pose-tracking pipeline (Workout player, Camera component, Assessments, Games) unless a narrower scope is listed.
| Parameter | Type | Default | Applies to | What it does internally |
| shouldAskCamera | boolean | true | Workout player, Challenge, Assessments | When false, the pre-workout camera-permission gate is skipped and navigation proceeds directly (the browser will still ask on first actual camera use). Use when your host app already manages the camera permission |
| shouldShowCameraSelector | boolean | false | Workout player, Camera, Assessments | Shows a camera-switch button on the camera-positioning (check-frame) screens so the user can pick between available camera devices |
| shouldShowOpenCameraSettings | boolean | false | All (camera-help modal) | Switches the camera-permission help modal to a step set that guides the user to their device camera settings (for hosts that can deep-link there) |
| cameraLabel | string | — | All pose-tracking views | Selects the camera device whose label contains this substring (e.g. "back", "wide"). If no device matches, falls back to the default front camera. Ignored when videoURL is set |
| minPoseDetectionConfidence | number | 0.75 | All pose-tracking views | MediaPipe minimum detection confidence (0–1). Lower = detects poses more easily but with more false positives |
| minTrackingConfidence | number | 0.75 | All pose-tracking views | MediaPipe minimum tracking confidence (0–1). Affects how persistently a pose is tracked between frames |
| minPosePresenceConfidence | number | 0.75 | All pose-tracking views | MediaPipe minimum presence confidence (0–1). Threshold for deciding a person is in frame |
| mediapipeModel | "full", "heavy", or "light" | auto | All pose-tracking views | Explicitly pins the MediaPipe pose model. When omitted, the SDK auto-selects light or full based on device speed — heavy is never auto-selected and is only used when you pass it explicitly here |
| defaultDelegate | "GPU" or "CPU" | "GPU" | All pose-tracking views | Processing backend for pose detection. The URL parameter ?delegate= overrides the postMessage value |
| landmarkColor | string | "#14FF00" | All pose-tracking views | Color of the skeleton overlay when the user's form is correct (# optional — it is added automatically). Mistake highlighting always uses red/orange on top of this |
| isDrawingPose | boolean | true | All pose-tracking views | When false, hides the skeleton overlay entirely. Pose recognition, rep counting, and mistake detection still run — only the drawing is disabled |
| showSilhouette | boolean | true | Workout player, Camera | When false, the camera-positioning (silhouette/check-frame) step is skipped entirely and the session starts straight on the exercise screen |
| includePoseData | string[] | — | Camera only | Which raw pose streams to emit as postMessage events, e.g. ["angles", "poseLandmarks", "worldLandmarks"]. "poseLandmarks" emits per-frame pose_landmarks messages, "worldLandmarks" emits world_landmarks, "angles" enables joint-angle computation. Ignored by every other integration option |
| includePoseBorders | boolean | true | All pose-tracking views | Enables the out-of-frame guard: when body parts leave the frame, the skeleton turns red, a "step back" cue plays, and rep counting pauses until the user is fully visible. false disables that guard |
| includeRealtimeAccuracy | boolean | true | Workout player, Camera | Tracks per-rep form accuracy and, when explicitly passed as true, additionally streams per-frame correct_position_accuracy postMessage events to the host. Note: passing false does not disable accuracy tracking (the flag is only applied when truthy) |
| videoFit | "cover" or "contain" | "cover" | All pose-tracking views | "contain" shows the full camera frame (letterboxed) instead of zooming to fill the view — useful when the full body must stay visible in tight layouts. Assessments force contain in landscape regardless of this value |
Notes:
videoURL(feed a video file instead of the live camera) is documented in Testing & Simulation.- Changing confidence values,
mediapipeModel, ordefaultDelegatetriggers a pose-model rebuild — set them at launch, not mid-session. - There is no automatic "heavy" model for balance assessments; if an assessment needs maximum accuracy, pass
mediapipeModel: "heavy"explicitly.
Camera & Pose Detection Settings
Swift example:
1// Via customParams
2kinestex.createCameraView(
3 exercises: exerciseList,
4 currentExercise: $currentExercise,
5 customParams: [
6 "landmarkColor": "#FF5500",
7 "showSilhouette": true,
8 "mediapipeModel": "heavy",
9 "defaultDelegate": "GPU",
10 "includePoseData": ["angles", "poseLandmarks"], // Camera component only
11 "includeRealtimeAccuracy": true,
12 "shouldShowCameraSelector": true,
13 "videoFit": "contain" // show full camera frame
14 ]
15)