KinesteX

Workout Activity Actions

Control workout state programmatically via postMessage using the workout_activity_action property.


ActionDescription
pause_workoutPauses the workout (video, timer, and tracking)
resume_workoutResumes a paused workout
mute_workoutMutes all audio (speech, sounds, and music)
unmute_workoutUnmutes all audio
mute_speechMutes only speech feedback (sounds still play)
unmute_speechUnmutes speech feedback

Note: These actions are sent via postMessage to the KinesteX iframe/webview after the workout has started.

Workout Activity Actions
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"]