Workout Activity Actions
Control workout state programmatically at runtime via postMessage using the workout_activity_action property.
| Action | Applies to | What it does internally |
| pause_workout | Workout player | Pauses the workout (video, timer, and tracking) and echoes a pause_workout confirmation message back |
| resume_workout | Workout player | Resumes a paused workout (echoes resume_workout) |
| mute_workout | Workout player | Mutes ALL audio — speech, sounds, and background music (echoes mute_workout) |
| unmute_workout | Workout player | Unmutes all audio (echoes unmute_workout) |
| mute_speech | Workout player | Mutes only spoken feedback; sound effects still play (echoes mute_speech) |
| unmute_speech | Workout player | Unmutes spoken feedback (echoes unmute_speech) |
| start | Custom Workout only | Starts the workout built from customWorkoutExercises — send it after all_resources_loaded arrives. Ignored on other integration options |
| load_models | Camera only | Fetches and caches additional exercise models mid-session: { workout_activity_action: "load_models", exercises: ["id1", "id2"], exerciseFetchType?: "model_id" }. Replies with models_loaded / error_occurred; loaded IDs become switchable via currentExercise |
Scope note: the pause/mute family only affects the standard workout player (Main, Workout, Plan, Personalized Plan, Custom Workout while an exercise is running). The Camera component, games, and assessments do not react to these actions — the Camera component has its own control commands sent through currentExercise (see Camera Component).
Note: These actions are sent via postMessage to the KinesteX iframe/webview after the initial verification.
Workout Activity Actions
Swift example:
1// Send workout activity action using @State binding
2// First, declare the state variable and pass it to the view:
3// @State var workoutAction: [String: Any]? = nil
4// kinestex.createWorkoutView(..., workoutAction: $workoutAction, ...)
5
6// Pause the workout
7workoutAction = ["workout_activity_action": "pause_workout"]
8
9// Resume the workout
10workoutAction = ["workout_activity_action": "resume_workout"]
11
12// Mute all audio
13workoutAction = ["workout_activity_action": "mute_workout"]
14
15// Unmute all audio
16workoutAction = ["workout_activity_action": "unmute_workout"]
17
18// Mute only speech (sounds still play)
19workoutAction = ["workout_activity_action": "mute_speech"]
20
21// Unmute speech
22workoutAction = ["workout_activity_action": "unmute_speech"]