Camera & Pose Detection
Fine-tune the camera and pose detection. These parameters affect every view that runs pose tracking (Workout player, Challenge, 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, AI Trainer | When false, the pre-workout camera-permission screens are skipped (the browser still asks on first camera use). Use it when your app already manages the camera permission |
| shouldShowCameraSelector | boolean | false | Workout player, Games, Camera, Assessments | Shows a camera-switch button on the positioning (check frame) screen so the user can pick between camera devices |
| shouldShowOpenCameraSettings | boolean | false | All (camera-help modal) | Switches the camera-permission help modal to steps that guide the user to their device camera settings. Its "Go to Settings" button sends open_camera_settings; open the device camera settings when you receive it. Send a boolean true by postMessage or in ?data= |
| cameraLabel | string | none | All pose-tracking views | Selects the camera whose label contains this text (e.g. "back", "wide"). If no device matches, the default front camera is used. Ignored when videoURL is set. A camera the user already picked in the camera selector (remembered on the device) takes priority |
| minPoseDetectionConfidence | number | 0.75 | All pose-tracking views | MediaPipe minimum detection confidence (above 0, up to 1). Lower detects poses more easily, with more false positives |
| minTrackingConfidence | number | 0.75 | All pose-tracking views | MediaPipe minimum tracking confidence (above 0, up to 1). How persistently a pose is tracked between frames |
| minPosePresenceConfidence | number | 0.75 | All pose-tracking views | MediaPipe minimum presence confidence (above 0, up to 1). Threshold for deciding a person is in view |
| mediapipeModel | "full", "heavy" or "light" | auto | All pose-tracking views | Pins the MediaPipe pose model. When omitted, the SDK picks light or full from the device's speed; heavy is never picked automatically |
| defaultDelegate | "GPU" or "CPU" | "GPU" | All pose-tracking views | Processing backend for pose detection. A ?delegate= URL parameter overrides the postMessage value |
| boundedPoseWait | boolean | false | All pose-tracking views | While the user waits on a loading screen, a slow start of the background pose engine is raced by a build on the main thread, so tracking can start sooner on devices where the background start is slow. Accepts true or "true" |
| landmarkColor | string | "#14FF00" | All pose-tracking views | Color of the skeleton overlay when the user's form is correct (# optional, it is added). Mistake highlighting always uses red or orange on top of it |
| isDrawingPose | boolean | true | All pose-tracking views | When false, hides the skeleton overlay. Pose recognition, rep counting and mistake detection still run: only the drawing is off |
| includePoseBorders | boolean | true | All pose-tracking views | The out-of-frame guard: when body parts leave the frame, the skeleton turns red, a "step back" cue plays and rep counting waits until the user is fully visible. false turns the guard off |
| 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 use contain in landscape regardless |
| showSilhouette | boolean | true | Workout player, Challenge, Camera | When false, the positioning (check frame) step is skipped and tracking starts at once. Camera details: Real-Time Motion Events |
| showFormGuidance | boolean | true (false in Camera) | Workout player, Challenge, Camera | Shows a live depth bar (for example squat depth) that guides the user to the right depth, for exercises that have depth guidance set up. While it is shown, each counted rep also sends rep_depth_angle |
| streamFormGuidance | boolean | false | Workout player, Challenge, Camera | Hides the built-in depth bar and streams its data to your app instead, as form_guidance_config and form_guidance_frame events (plus rep_depth_angle per rep), so you can draw your own. See Camera & Frame Events |
| includePoseData | string[] | none | Every pose-tracking view except Assessments and Games | Raw pose data per frame and, in workouts, the real-time motion events. See Real-Time Motion Events |
| includeRealtimeAccuracy | boolean | false | Workout player, Challenge, Camera | true streams a correct_position_accuracy event on every frame. See Real-Time Motion Events |
Notes:
videoURL(feed a video file instead of the live camera) is in Testing & Simulation.- The confidence values,
mediapipeModel,defaultDelegateandboundedPoseWaitare read once, at launch. - There is no automatic "heavy" model for balance assessments: pass
mediapipeModel: "heavy"if an assessment needs maximum accuracy.
Camera & Pose Detection Settings
Swift example:
1kinestex.createCameraView(
2 exercises: ["model-id-1", "model-id-2"],
3 currentExercise: $currentExercise,
4 user: nil,
5 style: nil,
6 isLoading: $isLoading,
7 customParams: [
8 "landmarkColor": "#FF5500",
9 "showSilhouette": true,
10 "mediapipeModel": "heavy",
11 "defaultDelegate": "GPU",
12 "shouldShowCameraSelector": true,
13 "videoFit": "contain" // show the full camera frame
14 ],
15 onMessageReceived: { message in /* ... */ }
16)