Skip to main content
Skip table of contents

Web SDK Reference | Get available AR modes

The getAvailableARModes() method can be called to get an list of the available AR modes.

TYPESCRIPT
getAvailableARModes(): Promise<ARMode[]>

Returns

Type

Description

ARMode[]

An array of AR modes available on the current device

TYPESCRIPT
type ARMode = 'webxr' | 'quicklook'

Example

TYPESCRIPT
async function getAvailableARModes() {
  try {
    const arModes = await window.twikit.getAvailableARModes();
    console.log(arModes); // on android returns ['webxr']
  } 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.