MP_SDK | Matterport SDK
Usage of the SDK constitutes your agreement with the Matterport SDK Agreement. Email developers@matterport.com with any questions.

The entrypoint for connecting to the SDK and creating an MpSdk interface.

Hierarchy

  • MP_SDK

Index

Methods

Methods

connect

  • bundle

    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 an iframe

    • Optional options: Partial<ConnectOptions>

      Additional, optional options to include while connect like auth tokens

    Returns Promise<MpSdk>

  • embed

    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>

  • embed

    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>