Application phases are returned as part of the state observable.
mpSdk.App.state.subscribe(function (appState) {
if(appState.phase === mpSdk.App.Phase.LOADING) {
console.log('The app has started loading!')
}
if(appState.phase === mpSdk.App.Phase.STARTING) {
console.log('The transition into the start location begins!')
}
if(appState.phase === mpSdk.App.Phase.PLAYING) {
console.log('The app is ready to take user input now!')
}
});
Typescript Declarations File
Typescript declarations for use with the Embed SDK are available here: 24.11.2_webgl-798-gf42d1db434
Declarations are already include in the Bundle SDK distribution.
Application phases are returned as part of the state observable.
mpSdk.App.state.subscribe(function (appState) { if(appState.phase === mpSdk.App.Phase.LOADING) { console.log('The app has started loading!') } if(appState.phase === mpSdk.App.Phase.STARTING) { console.log('The transition into the start location begins!') } if(appState.phase === mpSdk.App.Phase.PLAYING) { console.log('The app is ready to take user input now!') } });