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 |
| 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);
}
}