Closed
Bug 1284683
Opened 9 years ago
Closed 8 years ago
Unable to use device ids from the content process to call getUserMedia on the chrome process
Categories
(Core :: WebRTC: Audio/Video, defect, P1)
Core
WebRTC: Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: florian, Assigned: jib)
References
Details
Attachments
(2 files)
9.17 KB,
patch
|
Details | Diff | Splinter Review | |
58 bytes,
text/x-review-board-request
|
jesup
:
review+
|
Details |
In order to implement previews for the screensharing permission prompt, I've tried to get device ids from the content process (from the device list returned by mozGetUserMediaDevices) to use them in a gUM call in priviledged code running in the chrome process. This fails with a "OverconstrainedError: Constraints could be not satisfied." error.
I'm not sure why yet, but it could be that I'm getting per-origin ids that aren't usable from the chrome process.
Reporter | ||
Comment 1•9 years ago
|
||
Attaching the WIP patch I used to uncover this bug, just in case it could help with debugging.
Comment 2•9 years ago
|
||
jib - can you help out here?
Rank: 21
Component: Audio/Video → WebRTC: Audio/Video
Flags: needinfo?(jib)
Priority: -- → P2
Assignee | ||
Comment 3•9 years ago
|
||
So two things are going on here:
1. gUM deviceIds are unique per origin, so they're not easily reusable in browser chrome.
2. We don't support the deviceId constraint in gUM for screensharing.
Screensharing "devices" only have an id as an internal side-effect, since they're not exposed in navigator.mediaDevices.enumerateDevices(). The id's are also not stable AFAIK.
That said, we might be able to slap something together specifically for this, that is:
1. Don't anonymize internal screensharing id's.
2. Enable gUM deviceId constraint for screensharing only in browser chrome.
Assignee: nobody → jib
Flags: needinfo?(jib)
Reporter | ||
Comment 4•9 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] from comment #3)
> That said, we might be able to slap something together specifically for
> this, that is:
>
> 1. Don't anonymize internal screensharing id's.
> 2. Enable gUM deviceId constraint for screensharing only in browser chrome.
In the future I would like to experiment with showing a preview for cameras too (not automatically though, I think it should require a user click on the preview area), so it would be nice if we could find a solution that isn't restricted to screensharing.
Assignee | ||
Comment 5•9 years ago
|
||
OK in that case we should probably consider passing out a raw id as a separate chrome-only argument that would work when used as a constraint in chrome only. Then it would work the same for both camera and screenshare.
Comment 6•9 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] from comment #5)
> OK in that case we should probably consider passing out a raw id as a
> separate chrome-only argument that would work when used as a constraint in
> chrome only. Then it would work the same for both camera and screenshare.
That probably makes sense.
Note that all camera and screensharing access is done via CamerasParent in the Master Process; so that may lead to possible optimizations for preview. Conversely, tab capture (which isn't exposed, and may never be) is done from Content.
Updated•9 years ago
|
Rank: 21 → 15
Priority: P2 → P1
Comment hidden (mozreview-request) |
Comment 8•8 years ago
|
||
mozreview-review |
Comment on attachment 8782276 [details]
Bug 1284683 - add unanonymized nsIMediaDevice.rawId for browser-chrome use.
https://reviewboard.mozilla.org/r/72478/#review70252
Attachment #8782276 -
Flags: review?(rjesup) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 10•8 years ago
|
||
Rebased.
Comment 11•8 years ago
|
||
Pushed by jbruaroey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe29ddf5a719
add unanonymized nsIMediaDevice.rawId for browser-chrome use. r=jesup
Comment 12•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•