Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offscreen user media sample #1056

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aakash232
Copy link

@aakash232 aakash232 commented Dec 20, 2023

This recipe shows how to use User Media in an Extension Service Worker using the Offscreen document.

The extension aims to capture audio from the user in the context of extension (globally) via a media recorder in the offscreen document.

Aims to add a new sample fixing the issue : MV3 user's mic and cam permissions using iframe
Fixes #821

@aakash232
Copy link
Author

aakash232 commented Dec 20, 2023

@patrickkettner
As discussed on the mail, raised the PR for the sample.
Please review the same.

@aakash232
Copy link
Author

@oliverdunk
As discussed on the mail, raised the PR for the sample.
Please review and guide me for the same.

"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["contentScript.js"]
Copy link

@sorokinvj sorokinvj May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do just this

Suggested change
"js": ["contentScript.js"]
"js": ["contentScript.js", "requestPermissions.js"]

and run it without all the fuss with iframes, messaging to offscreen and back

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

however I still get permission in prompt state, so I am probably missing something from your code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MV3 user's mic and cam permissions using iframe
3 participants