Closed Bug 1402295 Opened 8 years ago Closed 8 years ago

getusermedia not working from extension background

Categories

(WebExtensions :: Compatibility, defect)

55 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1007817

People

(Reporter: pankagar, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063 Steps to reproduce: from web extension's background page execute navigator.mediaDevice.getUserMedia() API to capture screen video/audio. Actual results: Promise { <state>: "rejected", <reason>: MediaStreamError } Expected results: It should have launch popup window to take permission from user to share screen. As extension background is more secure , then It should not fails there.
See the (later) discussion in bug 1007817. We need a UI that identifies the extension as the source of the request, along with some other changes.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
HI Randell, Thanks for your response. Do you have any update where we can see timeline for fixing this bug. this is big blocker to ship our extension. Even If we think for workaround, Intranet sites are more secure then https origins, So why getUserMedia() is blocked to run on them as well ? or is there any settings to unable this API to execute on trusted websites ?
Flags: needinfo?(amckay)
This is not currently on any roadmap that I know of. Best way to track progress is to look at the duplicated bug.
Flags: needinfo?(amckay)
Thanks Andy for your reply. Any suggestion on this : Intranet sites are more secure then https origins, So why getUserMedia() is blocked to run on them as well ? or is there any settings to unable this API to execute on trusted websites ?
I don't know if Firefox distinguishes and "intranet" from any other site. I'm not an expert on that subject.
Pankaj, to call getUserMedia() you can create a regular page in your extension, open that page in a tab, and call getUserMedia() from the page. The permission prompts in Firefox are organized around showing you which specific page is requesting a permission which we can't effectively do for an extension background page since the page isn't actually visible to the user.
Hi Andrew, I have few questions : 1) how to open a new page from extension which would be visible in browser 2) what should be domain of that page : https/https/moz-extension://
We are opening a page like : moz-extension://98508e3b-adc0-4115-a428-86378ee1d59c/SessionReport/SessionReport.html In that page also If I call getUserMedia() then its giving following error : "The request is not allowed by the user agent or the platform in the current context."
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.