Zappar Aframe permissionRequest


Is there a way to call the permission request manually in ZapparAframe?

I’m looking for a solution to call this function in ZapparAframe:

Zappar.permissionRequest().then(granted => {
if (granted) {
    // User granted the permissions so start the camera
} else {
    // User denied the permissions
    // You can show your own 'permission denied' UI here or use Zappar's built-in one


Maybe there is a function but I can’t find it.
Best regards


Hi @christian1,

Thanks for your feature request.

We have just deployed an update (0.2.6) to the UAR AFrame library which includes the permissions dialog:

<!-- Ask user for camera permissions, display some text if permission is denied -->
<a-entity zappar-permissions-ui id="permissions">
  <!-- Remove the text entity to use Zappar's default permission denied UI -->
  <a-entity text="value: Please reload the page, accepting the camera permissions." position="0 0 -2"></a-entity>

Alongside this, the update includes a dialog for browser compatibility, for some more information check out the readme over at @zappar/zappar-aframe

Hope this helps!