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 |
| An array of AR modes available on the current device
TYPESCRIPT
|
Example
TYPESCRIPT
async function getAvailableARModes() {
try {
const arModes = await window.twikit.getAvailableARModes();
console.log(arModes); // on android returns ['webxr']
} catch (error) {
console.error(error);
}
}