Button to take photo and video

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:

<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:

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.