Closed Bug 1213453 Opened 9 years ago Closed 5 years ago

Implement MediaDeviceInfo.groupId

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox44 --- wontfix
firefox67 --- fixed

People

(Reporter: jib, Assigned: achronop)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-complete)

Attachments

(5 files)

"The origin-unique group identifier for the source of the MediaStreamTrack. Two devices have the same group identifier if they belong to the same physical device; for example, the audio input and output devices representing the speaker and microphone of the same headset would have the same groupId."

http://w3c.github.io/mediacapture-main/getusermedia.html#sec-track-properties
backlog: --- → webrtc/webaudio+
Rank: 25
Priority: -- → P2
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Assignee: nobody → achronop

Spec in [1] mentions: "The browsing session-unique group identifier for the source of the MediaStreamTrack."

[1] https://www.w3.org/TR/mediacapture-streams/#constrainable-properties

I would like to put here for reference that the correlation of video and audio devices relies on device names. If an audio device's name contains the name of the video device, then, this video device will take the group id of that audio device. The logic compares the input devices first, if it finds a much then comparison stops, if not it continues with the output devices. In addition to that if there is more than one much we do not attempt to correlate the devices. In general since this is a guess we try to minimize the probability of false positive.

On the other hand the groupId between audio devices that belong to the same physical device is provided by cubeb and it's always correct.

Blocks: 1532264
Pushed by achronopoulos@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6903f0739e83
Add group id in various MediaManager classes. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/f78c357f2f5f
Add getters/setters for group id in MediaEngineSource and the derived classes. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/ec1da6bbf1a7
Session-unique group id. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/6208d9e15f3d
Correlate video device group id based on device name. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/118792523194
Update mochitest to expect group id. r=pehrsons
Pushed by achronopoulos@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19934e7183f7
Add group id in various MediaManager classes. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/7e561fa634f7
Add getters/setters for group id in MediaEngineSource and the derived classes. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/1cac58480c6a
Session-unique group id. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/a90a2cb536f3
Correlate video device group id based on device name. r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/75033c11fa3c
Update mochitest to expect group id. r=pehrsons

Relanded thanks.

Flags: needinfo?(achronop)
Depends on: 1535044

Note to MDN writers:

I've added a note about this to the Fx67 rel notes about this:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/67#Media_Web_Audio_and_WebRTC

In terms of other work:

  • The BCD needs updating
  • the groupId page needs updating to fill it in a bit (e.g. adding an Example)

Added example to the page https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo/groupId; also updated and expanded the text slightly (and the example has a long explanation of how it works).

BCD claimed this was added back in Firefox 35 or so, but I've submitted a PR to change it to 67.

Submitted PR 4093 to update BCD

Added a sentence to the existing note on Firefox 67 for developers to explain that the property has existed since Firefox 39, but didn't actually group related items until 67.

Regressions: 1534495
Depends on: 1561254
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: