[How to] Set a callback on the VTO?
The VTO module provides several callbacks which correspond to changes of state of the module. All the callbacks are listed in the API Reference > Callbacks.
Setting a callback function to be invoked by one of these callback triggers is done via the instantiation parameters.
var params = {
apiKey: '...',
defaultMode: 'live',
...
// via lambda
onLiveStatus: (data) => {
},
// via function pointer
onStopVto: hideVTO,
}
fitmixInstance = FitMix.createWidget('my-fitmix-container', params, function() {});
function hideVTO() {
// Your code to hide the VTO
}