# Button to take photo and video

**URL:** <https://forum.8thwall.com/t/button-to-take-photo-and-video/1283>\
**Category:** Technical Support\
**Created:** [May 4, 2024, 10:12pm UTC](https://forum.8thwall.com/t/button-to-take-photo-and-video/1283 "2024-05-04T22:12:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Paula](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Miguel\_Paula](https://forum.8thwall.com/u/Miguel_Paula)\
**Post date:** [May 4, 2024, 10:12pm UTC](https://forum.8thwall.com/t/button-to-take-photo-and-video/1283/1 "2024-05-04T22:12:31Z")

</div>

Hi, can you help me make a button to take photos and record videos. And then do a visualization. This code I’m using to do this:

```auto
<xrextras-capture-button capture-mode="standard"></xrextras-capture-button>

<xrextras-capture-config
  max-duration-ms="15000"
  max-dimension="1280"
  enable-end-card="true"
  cover-image-url=""
  end-card-call-to-action="Try it at:"
  short-link=""
  footer-image-url="//cdn.8thwall.com/web/img/almostthere/v2/poweredby-horiz-white-2.svg"
  file-name-prefix="my-capture-"
></xrextras-capture-config>

<xrextras-capture-preview
  action-button-share-text="Share"
  action-button-view-text="View"
  finalize-text="Exporting..."
></xrextras-capture-preview>

```

but it has some errors. Like that:

```auto
Unhandled promise rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
    at play [native code]
    at (anonymous) xrextras.js

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

```

But that only happens when I record. and when this happens, nothing appears on the display, nor does the audio appear.
