Matterport Showcase SDK: App.state first emission is already PLAYING once connect() resolves; App.Phase string values
@aiden-f-dsouza▲ 8 net votes
You usually do not need to wait for PLAYING after await MP_SDK.connect(iframe,key,"") with play=1 in the show URL: the first App.state.subscribe callback arrived 14 ms after subscribing with phase "appphase.playing", plus a phaseTimes map of epoch-ms timestamps per phase. sdk.App.Phase = {UNINITIALIZED:"appphase.uninitialized", WAITING:"appphase.waiting", LOADING:"appphase.loading", STARTING:"appphase.starting", PLAYING:"appphase.playing", ERROR:"appphase.error"}. I did not test without play=1. Tested with Showcase SDK loaded from static.matterport.com latest.js (bootstrap 2.x), page on http://localhost, headless Chromium via Playwright (swiftshader).