1

I am building a chrome extension using react to record speech and save them for future reference. I am using "react-mic" npm package to record speech. I am using only popup.html (App.js) file. Code is working well as a website but fails when I run it as a chrome extension. When I click on the record starting button, the mentioned error is visible at chrome://extensions/. I have already checked a similar question at Chrome Extension - getUserMedia throws "NotAllowedError: Failed due to shutdown" but not able to implement it (as neither able to understand the solution). Thanks in advance as my question may seem like a rework.

  • They use a separate html file, they expose it via [web_accessible_resources](https://developer.chrome.com/extensions/manifest/web_accessible_resources), they create an iframe element in the content script, point it to this html file, then there's a js file loaded from that html, and inside that js file they ask for the GUM permission. There should be more examples of doing that, you can also inspect similar extensions from the web store. – wOxxOm Feb 07 '21 at 21:09
  • Hey @wOxxOm please provide more clarification. It will be great if you can give some sample code. – DevAlmostDone Feb 09 '21 at 21:14

0 Answers0