# Real-Time Motion Events

Launch options that turn on or shape the [real-time motion events](/docs/data-points/realtime-motion-events) (reps and holds, form state, feedback, presence, framing, gestures, inactivity) and the raw pose data. The Camera component always sends the real-time events; workout flows send them only when `includePoseData` contains `"events"`. For the Camera component walkthrough, see [Camera Component: real-time events](/docs/integration/camera-component#camera-component-realtime-events).

**Workout flows** here means every view that runs the KinesteX exercise player: Main, Workout, Plan, Personalized Plan, Custom Workout, Challenge, AI Trainer workouts and the Box and Training experiences. Assessments and games send none of these events.

| Option | Type | Default | Camera component | Workout flows |
|--------|------|---------|------------------|---------------|
| includePoseData | string[] | none | `"poseLandmarks"`: a `pose_landmarks` event every frame with a person. `"worldLandmarks"`: `world_landmarks` (meters, hip-centered). `"angles"`: adds 2D and 3D joint angles to those events. `"events"` is not needed: the real-time events are always on | `"events"`: turns the real-time events on, plus `exercise_setup` when each exercise starts and `successful_repeat` / `action` per rep. `"poseLandmarks"` / `"worldLandmarks"`: every frame of the check frame and the exercises (not on rest screens), with `exercise` (`null` during the check frame); 2D angles are always included and `"angles"` adds 3D |
| inactivityTimeout | number (seconds) | 15 | Idle seconds before `activity` `INACTIVE` | Same, with `"events"` |
| includeFramingHints | boolean | false | `framing_hint` (missing body parts, step back or move to center) while the positioning check is open | Same, with `"events"` |
| includeFormState | boolean | false | `form_state` (`GOOD`, `ADJUST`, `OUT_OF_POSITION`) | Same, with `"events"` |
| enableGestureControl | boolean | false | Posts `gesture_detected` (`PAUSE` or `RESUME`) when the user makes the hands pause gesture. KinesteX does not pause: your app decides | Not used. The workout pauses and resumes on the gesture itself (unless `preventGestureControl`), and with `"events"` posts `gesture_detected` when it does |
| frameExitPrompt | boolean | false | Plays the spoken prompt asking the user to come back when they leave the view (`presence` `LEFT`) | Not used: the workout already pauses and plays the prompt when the user leaves the frame |
| frameExitPause | boolean | false | No reps count while the user is out of view (from `presence` `LEFT` to `RETURNED`); a rep half done when they left is not counted | Not used: the workout pauses itself |
| showSilhouette | boolean | true | `true`: the positioning check opens before tracking. `false`: tracking starts at once, and `framing_hint` / `person_in_frame` are sent only during a check you open with `reset_check_frame` | `false` skips the positioning check |
| includeRealtimeAccuracy | boolean | false | `true` streams `correct_position_accuracy` (`accuracy`) on every frame matched against the exercise's positions | Same |

**In the URL:** `includePoseData` also takes a comma list (`?includePoseData=poseLandmarks,events`); `inactivityTimeout` is read as a number and the booleans accept `true` / `false`. See [URL Parameters](/docs/customization-parameters/url-parameters).

**Workouts:** add `includePoseData: ["events"]` (plus any opt-in above) to the custom params of your workout, plan, challenge or custom workout view. The workout's own events (`exercise_completed`, `workout_progress`, ...) are sent either way. See [Workout Events](/docs/data-points/workout-events).

**Related:** `streamFormGuidance` streams the depth-bar data ([Camera & Pose Detection](/docs/customization-parameters/camera-pose-detection)). `pauseCamera` and `muteWorkout` start the Camera component with the camera off or muted ([Camera Component parameters](/docs/customization-parameters/camera-component-params)).

**Real-time motion events in the Camera component**

_Swift (iOS)_
```swift
kinestex.createCameraView(
    exercises: ["model-id-1", "model-id-2"],
    currentExercise: $currentExercise,
    user: nil,
    style: nil,
    isLoading: $isLoading,
    customParams: [
        "includePoseData": ["poseLandmarks"], // workouts: ["events"]
        "inactivityTimeout": 20,
        "includeFramingHints": true,
        "includeFormState": true,
        "enableGestureControl": true,
        "frameExitPrompt": true,
        "frameExitPause": true,
        "includeRealtimeAccuracy": true
    ],
    onMessageReceived: { message in
        // form_state, activity, presence, ... arrive as .custom_type
    }
)
```

_Kotlin (Android)_
```kotlin
KinesteXSDK.createCameraComponent(
    context = this,
    exercises = listOf("model-id-1", "model-id-2"),
    currentExercise = "model-id-1",
    customParams = mutableMapOf(
        "includePoseData" to listOf("poseLandmarks"), // workouts: listOf("events")
        "inactivityTimeout" to 20,
        "includeFramingHints" to true,
        "includeFormState" to true,
        "enableGestureControl" to true,
        "frameExitPrompt" to true,
        "frameExitPause" to true,
        "includeRealtimeAccuracy" to true
    ),
    isLoading = viewModel.isLoading,
    onMessageReceived = { message -> handleWebViewMessage(message) }, // events arrive as CustomType
    permissionHandler = this
)
```

_React Native_
```jsx
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  exercises: ['model-id-1', 'model-id-2'],
  currentExercise: 'model-id-1',
  customParameters: {
    includePoseData: ['poseLandmarks'], // workouts: ['events']
    inactivityTimeout: 20,
    includeFramingHints: true,
    includeFormState: true,
    enableGestureControl: true,
    frameExitPrompt: true,
    frameExitPause: true,
    includeRealtimeAccuracy: true,
  },
};
```

_Flutter_
```dart
KinesteXAIFramework.createCameraComponent(
  exercises: ["model-id-1", "model-id-2"],
  currentExercise: "model-id-1",
  customParams: {
    "includePoseData": ["poseLandmarks"], // workouts: ["events"]
    "inactivityTimeout": 20,
    "includeFramingHints": true,
    "includeFormState": true,
    "enableGestureControl": true,
    "frameExitPrompt": true,
    "frameExitPause": true,
    "includeRealtimeAccuracy": true,
  },
  isShowKinestex: showKinesteX,
  isLoading: isLoading,
  onMessageReceived: handleMessage, // events arrive as CustomType (message.data['type'])
);
```

_HTML / JavaScript_
```html
// iframe src: https://ai.kinestex.com/camera
const postData = {
  userId: "user-123",
  company: "YOUR_COMPANY",
  key: "YOUR_API_KEY",
  exercises: ["model-id-1", "model-id-2"],
  currentExercise: "model-id-1",
  includePoseData: ["poseLandmarks"], // workouts: ["events"]
  inactivityTimeout: 20,
  includeFramingHints: true,
  includeFormState: true,
  enableGestureControl: true,
  frameExitPrompt: true,
  frameExitPause: true,
  includeRealtimeAccuracy: true,
};
```

_React (TypeScript)_
```tsx
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  exercises: ['model-id-1', 'model-id-2'],
  currentExercise: 'model-id-1',
  customParameters: {
    includePoseData: ['poseLandmarks'], // workouts: ['events']
    inactivityTimeout: 20,
    includeFramingHints: true,
    includeFormState: true,
    enableGestureControl: true,
    frameExitPrompt: true,
    frameExitPause: true,
    includeRealtimeAccuracy: true,
  },
};
```

---
Source: https://www.kinestex.com/docs/customization-parameters/realtime-motion-params · Index: https://www.kinestex.com/llms.txt
