Skip to main content
Skip table of contents

Web SDK Reference | Start AR

The startAr() starts AR using the currently loaded product

JS
startAr(arMode: ARMode): Promise<void>

Parameters

Name

Type

Description

arMode

'webxr' | 'quicklook'

The AR mode that should be used to start AR

Example usage

JS
async function startAr() {
  try {
    const arModes = await window.twikit.getAvailableARModes();
    await window.twikit.startAr(arModes[0]);
  } catch (error) {
    console.error(error);
  }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.