Closed
Bug 1919160
Opened 2 months ago
Closed 19 days ago
Stop reporting facingMode on mac laptops and desktops
Categories
(Core :: WebRTC: Audio/Video, defect)
Core
WebRTC: Audio/Video
Tracking
()
RESOLVED
FIXED
134 Branch
Tracking | Status | |
---|---|---|
firefox134 | --- | fixed |
People
(Reporter: jib, Assigned: dbaker, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
STRs: On a macOS laptop, type this into web console:
"facingMode" in (await navigator.mediaDevices.getUserMedia({video: true})).getVideoTracks()[0].getSettings()
Expected result (Chrome and Safari*):
- false
Actual result (Firefox):
- true
This comes from the following code which I thought clever many years ago:
#ifdef XP_MACOSX
// Kludge to test user-facing cameras on OSX.
if (aDeviceName.Find(u"Face"_ns) != -1) {
return Some(VideoFacingModeEnum::User);
}
#endif
Since MBP cameras tend to be branded "FaceTime HD Camera", and are built-in to laptops, we know they're technically user-facing, and conveniently have the word "Face" in them.
In hindsight, I think this was a mistake, because:
- other browsers aren't doing it,
- seems arbitrary and inconsistent with Windows and Linux, and
- it trips up websites using facingMode (in getSettings() or getCapabilities()) to detect "this is a mobile browser" (phone or pad)
I think it would be better to remove this code I think, and leave facingMode to be a "mobile" property of devices with front and back cameras.
Not a regression.
Updated•2 months ago
|
Blocks: webrtc-triage
Updated•2 months ago
|
Flags: needinfo?(dbaker)
Updated•21 days ago
|
Severity: -- → S2
Assignee | ||
Comment 1•20 days ago
|
||
Updated•20 days ago
|
Assignee: nobody → dbaker
Status: NEW → ASSIGNED
Pushed by dbaker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/247e6d9d4524
Stop reporting facingMode on mac laptops and desktops;r=jib
Comment 3•19 days ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 19 days ago
status-firefox134:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Updated•2 hours ago
|
Flags: qe-verify+
You need to log in
before you can comment on or make changes to this bug.
Description
•