KinesteX

Testing & Simulation (videoURL)

How to test the integration without physically performing the exercises.


Applies to: Workout player (Main, Workout, Plan, Personalized Plan, Custom Workout), Camera, Assessments. Not supported by the games (Balloon Pop, Color Chase, Alien Squat Shooter) — they always use the live camera.


ParameterTypeDefaultApplies toWhat it does internally
videoURLstringWorkout player, Camera, AssessmentsReplaces the live camera stream as the motion-tracking input. Instead of opening the device camera (getUserMedia), the SDK sets the provided URL as the source of its internal <video> element and runs the full MediaPipe pose-tracking pipeline on that video — rep counting, form analysis, accuracy scoring, and statistics all work exactly as if a real person were moving in front of the camera

Behavior details:

  • The video loops continuously until the session ends — it never stops on its own, 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 with Access-Control-Allow-Origin), otherwise landmark extraction fails.
  • Pose processing runs on the main thread when videoURL is set (the web-worker fast path is only used for the live camera). This is intentional and does not change results.
  • No camera permission is requested for the video-driven pipeline itself.
  • The video should show one fully visible person performing the target exercise, filmed like a normal front-facing camera feed. You can use the exercise's own demo video from the Content API (video_URL field) 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 verify it via the Workout Sessions API.

3. Optionally add showSilhouette: false to skip the camera-positioning (silhouette) screen, or immediateShowSkip: true to show its Skip button instantly.

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 any tracking data, motionTrackingEnabled: false (see Motion Tracking Settings) converts exercises to auto-advancing timers — but then no reps are counted and no accuracy data is produced. Use videoURL when you need realistic tracking data without a person.

Simulate a workout with a prerecorded video
Swift example:
1// Via customParams — full tracking pipeline runs on the video
2kinestex.createWorkoutView(
3    workout: "Fitness Lite",
4    user: user,
5    customParams: [
6        "videoURL": "https://cdn.yourapp.com/test/squats-demo.mp4",
7        "shouldSendStats": true // save the simulated session
8    ],
9    isLoading: $isLoading,
10    onMessageReceived: { /* ... */ }
11)