Testing & Simulation (videoURL)
How to test the integration without physically performing the exercises.
Applies to: Workout player, Challenge, Camera, Assessments. Not supported by the games (Balloon Pop, Color Chase, Alien Squat Shooter): they always use the live camera.
| Parameter | Type | Default | Applies to | What it does internally |
| videoURL | string | none | Workout player, Challenge, Camera, Assessments | Replaces the live camera as the motion-tracking input. Instead of opening the device camera, the SDK plays the URL in its internal <video> element and runs the full pose-tracking pipeline on it: rep counting, form analysis, accuracy scoring and statistics all work as if a person were moving in front of the camera |
Behavior details:
- The video loops until the session ends, so reps keep counting for as long as the exercise runs.
- The video is loaded with
crossOrigin="anonymous", so the URL must be CORS-accessible (served withAccess-Control-Allow-Origin), otherwise landmark extraction fails. - Pose processing runs on the main thread when
videoURLis set (the web-worker path is only used for the live camera). This does not change results. - No camera permission is needed for the video itself.
- The video should show one fully visible person performing the target exercise, filmed like a normal front-facing camera feed. The exercise's own demo video from the Content API (
video_URLfield) works as a ready-made input.
Recommended testing recipe:
1. Pass videoURL pointing at a recording of the exercise being performed.
2. Pass shouldSendStats: true if you want the simulated session saved to the backend (Session & Data Saving) so you can check it in the Workout Sessions API.
3. Optionally add showSilhouette: false to skip the positioning (check frame) screen, or immediateShowSkip: true to show its Skip button at once.
4. Optionally use start_from_exercise (with completed_exercises and start_from_rest: true) to jump to a later part of the workout (Workout Configuration).
When NOT to use `videoURL`: if you only need to click through screens without tracking data, motionTrackingEnabled: false (see Motion Tracking Settings) turns the camera off. Users then log their sets by hand in the Gym Log (or get auto-advancing timers with selfModeEnabled: false), and no pose-based accuracy or form data is produced. Use videoURL when you need realistic tracking data without a person.
1// The full tracking pipeline runs on the video
2kinestex.createWorkoutView(
3 workout: "Fitness Lite",
4 user: nil,
5 style: nil,
6 isLoading: $isLoading,
7 customParams: [
8 "videoURL": "https://cdn.yourapp.com/test/squats-demo.mp4",
9 "shouldSendStats": true // save the simulated session
10 ],
11 onMessageReceived: { message in /* ... */ }
12)