Usage of the SDK constitutes your agreement with the Matterport SDK Agreement. Email developers@matterport.com with any questions.
Hierarchy
- MP_SDK
Index
Methods
Methods
connect
-
Connect to the Bundle SDK and create an MpSdk interface.
const bundleIframe = document.getElementById<HTMLIFrameElement>('showcase'); const showcaseWindow = bundleIframe.contentWindow as ShowcaseBundleWindow; showcaseWindow.MP_SDK.connect(showcaseWindow);
Parameters
-
target: ShowcaseBundleWindow
The window that Showcase was opened within. Can be the
contentWindow
of aniframe
-
Optional options: Partial<ConnectOptions>
Additional, optional options to include while connect like auth tokens
Returns Promise<MpSdk>
-
-
Connect to the Embed SDK and create an MpSdk interface.
const showcaseIframe = document.getElementById<HTMLIFrameElement>('showcase'); const embeddingWindow = window as ShowcaseEmbedWindow; embeddingWindow.MP_SDK.connect(showcaseIframe);
Parameters
-
target: HTMLIFrameElement
The iframe of the embedded Showcase
-
Optional options: Partial<ConnectOptions>
Additional, optional options to include while connect like auth tokens
Returns Promise<MpSdk>
-
-
Connect to the Embed SDK and create an MpSdk interface.
const showcaseIframe = document.getElementById<HTMLIFrameElement>('showcase'); const embeddingWindow = window as ShowcaseEmbedWindow; embeddingWindow.MP_SDK.connect(showcaseIframe, `${APPLICATION_KEY}, '');
Parameters
-
target: HTMLIFrameElement
-
applicationKey: string
-
unused: ""
Returns Promise<MpSdk>
-
The entrypoint for connecting to the SDK and creating an MpSdk interface.