getUserMedia() should fail gracefully from background or popup pages

UNCONFIRMED
Unassigned

Status

P5
normal
UNCONFIRMED
a year ago
7 months ago

People

(Reporter: vinayendra.tn, Unassigned)

Tracking

57 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36

Steps to reproduce:

Repro Steps are explained here: https://bugzilla.mozilla.org/show_bug.cgi?id=1122036

I would say the root cause of the issue is chrome.desktopCapture is not implemented in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1303919)

The reason given in getUserMedia() should pop up alert asking for permissions. But the alert is not shown for an addon at all. Calling getUserMedia() from an addon will automatically get rejected. 

https://bugzilla.mozilla.org/show_bug.cgi?id=1007817
https://bugzilla.mozilla.org/show_bug.cgi?id=1122036
https://bugzilla.mozilla.org/show_bug.cgi?id=1363854

I am middle of developing an app which works smoothly in Firefox and Opera but errors out Firefox. Without this bug being fixed, no dev can write any app with screen capture on Firefox


Actual results:

Below Error:
"stringBundle is undefined" 

Or:
The permission to get video/audio is automatically rejected.


Expected results:

Should give handle to Video
(Reporter)

Updated

a year ago
Summary: WebExtensions: getUserMedia() is unusable in a addon → WebExtensions: getUserMedia() is unusable in an addon
Component: Untriaged → WebExtensions: Compatibility
Product: Firefox → Toolkit
You can't use getUserMedia() from a background or popup page, see bug 1278100 for an explanation and workaround.
We should, however, make it fail properly instead of throwing an internal error when called from an invalid place.
Priority: -- → P5
See Also: → bug 1278100
Summary: WebExtensions: getUserMedia() is unusable in an addon → getUserMedia() should fail gracefully from background or popup pages
(Reporter)

Comment 2

a year ago
@andrew
I did try using a tab instead of background but it auto rejects without asking the user to allow the action. The Video/Mic does show up a dialog box but not screen.

Updated

7 months ago
Blocks: 1303919

Updated

7 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.