Ask for microphone permission for the extension

80 views
Skip to first unread message

Zaid

unread,
Sep 28, 2024, 1:50:07 PMSep 28
to Chromium Extensions

Hello everyone, I am working on a chrome extension that would record user current tab screen using tab capture api. However, when I try to call the `getUserMedia` from the content script, it prompts a permission for the current webpage microphone access instead of the extension microphone access.

```
const audioStream = await navigator.mediaDevices.getUserMedia({
    audio: true
});
```

I tested other screen recorder extension where when I first install the extension and click on the extension icon and try to record a screen, it prompts a microphone permission access for the entire extension for once and if allowed, it never ask for it again, unlike mine, where it ask for every new page.

[Chrome extension permission for once](https://i.sstatic.net/AHyxrY8J.png)

As you can see in the image, loom ask for the microphone permission for once and would never ask again on any page if allowed.
Reply all
Reply to author
Forward
0 new messages