Appearance
Reference
Global SDK object
The hosted script exposes a global trainingkit object.
Methods
trainingkit.init(baseUrl)
Initializes the SDK with your TrainingKit base URL.
js
trainingkit.init('https://cloud.YourCompany.fizzup.com')trainingkit.start(options)
Starts a workout session.
js
trainingkit.start({
workoutId: '4RGZ7S46',
soundpack: 'none',
getAccessToken: async function () {
return 'your-access-token'
},
onWorkoutQuit: function () {},
onWorkoutSave: function (workoutData) {},
onWorkoutEvent: function (action, payload) {},
})Options
| Field | Required | Description |
|---|---|---|
workoutId | Yes | TrainingKit workout identifier to launch |
soundpack | No | Sound theme for the workout experience |
getAccessToken | No | Async callback returning a backend-issued access token |
onWorkoutQuit | No | Callback called when the user quits the workout |
onWorkoutSave | No | Callback called when workout data is saved |
onWorkoutEvent | No | Generic callback receiving event name and payload |
trainingkit.close()
Closes the TrainingKit iframe.
js
trainingkit.close()Supported soundpacks
Based on the current example flow:
nonezenoriginalnewwhistle
