Closed
Bug 1397978
Opened 7 years ago
Closed 2 years ago
Delay enumerateDevices() success until page has focus
Categories
(Core :: WebRTC: Audio/Video, enhancement, P2)
Core
WebRTC: Audio/Video
Tracking
()
RESOLVED
DUPLICATE
of bug 1732410
Tracking | Status | |
---|---|---|
firefox57 | --- | affected |
People
(Reporter: jib, Assigned: jib)
References
(Depends on 1 open bug)
Details
To be spec compliant we must implement the [[storedDeviceList]] requirement in enumerateDevices [1] which prevents JS from polling on enumerateDevices to circumvent devicechange event restrictions.
Basically, subsequent calls to enumerateDevices must return the same (cached) result, until a devicechange event has been fired on navigator.mediaDevices.
We should not land this before bug 1397977, to prevent hampering users.
[1] https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediadevices-enumeratedevices()
Assignee | ||
Updated•7 years ago
|
Rank: 22
Comment 1•7 years ago
|
||
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jib
Priority: P3 → P2
Summary: Cache enumerateDevices list to not reveal updates until devicechange event has fired. → Mitigate enumerateDevices() revealing new device info until devicechange event has fired.
Assignee | ||
Updated•6 years ago
|
Rank: 22 → 19
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
To be spec compliant we must implement the [[storedDeviceList]] requirement in enumerateDevices
The [[storedDeviceList]] has been revealed to be insufficient to guard against background access. The new plan is to postpone the promise from enumerateDevices() until the page receives focus, similar to what we do for getUserMedia() today.
[1] https://github.com/w3c/mediacapture-main/issues/561#issuecomment-457713003
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
Some more context on this: getUserMedia has the following language today:
- "Run the following steps in parallel:
- The user agent MAY wait to proceed to the next step until the current settings object's responsible document is fully active and has focus. "
The plan would be to add similar language to enumerateDevices() to solve this issue.
Assignee | ||
Comment 4•5 years ago
|
||
The new spec language mentioned in comment 3 is now available in enumerateDevices:
- The User Agent MUST wait to proceed to the next step until the device information can be exposed check returns true.
The User Agent MAY wait to proceed to the next step until document is fully active and has focus.
I'm leaning toward implementing the latter.
Summary: Mitigate enumerateDevices() revealing new device info until devicechange event has fired. → Delay enumerateDevices() success until page has focus
Assignee | ||
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•