Closed Bug 1876636 Opened 10 months ago Closed 2 months ago

With privacy.resistFingerprinting track.label & track.getSettings().deviceId differ from enumerateDevices()

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: jib, Assigned: jib, NeedInfo)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

With bug 1372073, Firefox reveals a single virtual camera and a single virtual microphone to the webpage, regardless of the device(s) chosen by the end-user in Firefox's permission prompt. But the illusion breaks spec, since track.label and track.deviceId differ from enumerateDevices.

STR:

  1. In about:config set privacy.resistFingerprinting to true
  2. Open https://jsfiddle.net/jib1/LbtxeLvw/ and revoke any persistent permission (from the URL bar)
  3. Click Start! and Allow
  4. Click Enumerate!

Expected result:

Microphone (live): Default Audio Device (yQKd8pvj9H4jWx7oVQ6lNZdlXWc6r4vpyn7UpUPksEA=)
Camera (live): Default Video Device (NYJ3Sh2xbwtBkMTZiWAWv7sRLwI5vsWdlvjhG8hWFOY/4=)
Enumerate 2 devices.
audioinput: Default Audio Device (yQKd8pvj9H4jWx7oVQ6lNZdlXWc6r4vpyn7UpUPksEA=)
videoinput: Default Video Device (NYJ3Sh2xbwtBkMTZiWAWv7sRLwI5vsWdlvjhG8hWFOY/4=)

Actual result:

Microphone (live): Internal Microphone (XG9Xdx7rc7Y9mA15fdd4BQNNBiYnGbPSDsMIw4xrWMs=)
Camera (live): Internal Camera (RloHNZKXE41tSKzAy9a4B1nBFVCZYY0IwZ9IKuFGV/4=)
Enumerate 2 devices.
audioinput: Default Audio Device (yQKd8pvj9H4jWx7oVQ6lNZdlXWc6r4vpyn7UpUPksEA=)
videoinput: Default Video Device (NYJ3Sh2xbwtBkMTZiWAWv7sRLwI5vsWdlvjhG8hWFOY=)

The suggested fix would be to align the track output with that of enumerateDevices (not the other way around).

Blocks: 1876810
Severity: -- → S3
Priority: -- → P2
See Also: → 1899736

can we close this issue since bug 1899736 seemingly fixed this issue?

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED

I didn't mean to close it, sorry.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

When you have an opportunity, we just wanted to confirm this with you.

Flags: needinfo?(jib)

I see no tests in bug 1899736. Where is resistFingerprinting tested?

I've verified the fix by setting privacy.resistFingerprinting to true in about:config locally and looking at this test in https://wpt.live/mediacapture-streams/MediaStreamTrack-getSettings.https.html which failed in release and now succeeds in nightly:

  • groupId is correctly reported by getSettings() for all input devices

Despite its name it relies on both deviceId and groupId. I'll update the test to be clearer and more thorough (but it still won't test resistFingerprinting).

Flags: needinfo?(jib)
Assignee: nobody → jib
Pushed by jbruaroey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e85bbde80dd8 Update WPT MediaStreamTrack-getSettings.https.html to verify deviceId & groupId of initial gUM call. r=karlt
Status: REOPENED → RESOLVED
Closed: 4 months ago2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48269 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot

I've attempted to reproduce the issue in Nightly 124.0a1 (2024-01-25) by following the STR from Comment 0.
The results were as follows:

Microphone (live): Internal Microphone (WhEksNbn918s9ByHQH2aXk/HtcVVSTwsZoVkqmy2J6I=)
Camera (live): Internal Camera (oL8MC48R7wwFrPXNTkVGb5hlc4vqIGI0x02+EtkpMbw=)
Enumerate 2 devices.
audioinput: Default Audio Device (d0eDY14zhz+oQD3LMMBeLC2f5nm8j7Co6JA9K9fNDXk=)
videoinput: Default Video Device (thw6aahrwtwhXKd825iz3MDvxUmUoUM7ygMZQSMWjyg=)

These results seem to align with the actual result mentioned in Comment 0.
Based on my understanding, the device names should be displayed as Default Audio/Video Device when privacy.resistFingerprinting is set to true.
However, in Firefox 132.0b7, I've noticed different results:

Microphone (live): Internal Microphone (BgvHNF71uegMmhKRIvmnD+gviWicuBvGBs2AAw9VxTM=)
Camera (live): Internal Camera (1sD2FIg2Bbwlr0g+LsELQeBFQkTXrmuz7CiKLLr14Uc=)
Enumerate 3 devices.
audioinput: Internal Microphone (BgvHNF71uegMmhKRIvmnD+gviWicuBvGBs2AAw9VxTM=)
videoinput: Internal Camera (1sD2FIg2Bbwlr0g+LsELQeBFQkTXrmuz7CiKLLr14Uc=)
audiooutput: Internal Speaker (17SHLFG8psLaLLr8QPjwcoO3w7q3j7PymrG3wr+4dK8=)

This indicates that the issue may not be fully resolved, as the device names are still displayed as Internal Camera/Microphone. Could you please have a look and let me know if I may have missed something in my testing? Thank you.

Flags: needinfo?(jib)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: