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.12.3_webgl-944-ge03b07c22c
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!') } });