enumerateDevices still doesn't work with pipewire
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
People
(Reporter: david.turner, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
478 bytes,
text/plain
|
Details |
I don't know what test was used to verify the patches for Bug 1844020 but using my reproducer (attached) the problem does not appear to be fixed.
I'm testing with the latest bookmarks/central on aarch64 on a Raspberry Pi 4 using Raspberry Pi OS bookworm (based on debian bookworm). The system has 5 V4L2 video capture devices, 2 audio capture devices, and 1 pipewire/libcamera video capture device. media.webrtc.camera.allow-pipewire is set to true.
- If I open a fresh Firefox instance and run the reproducer, I see 2 audio devices and no video devices.
- If I open a fresh Firefox instance and run a camera capture on https://mozilla.github.io/webrtc-landing/gum_test.html and then load the reproducer I see 2 audio devices and 6 video devices (5 v4l2 and 1 pipewire).
- I would expect to see 2 audio devices and 6 video devices even if I don't run the GUM test beforehand.
| Reporter | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
This is per design.
Our enumeration code is not up to spec, we call this "legacy mode". The spec forbids enumerating devices before a successful gUM request. Such an enumeration will only expose a single placeholder device per kind with empty attributes, i.e. a site can only know whether the system has some cameras or some audio inputs present.
Pipewire requires showing a prompt before we can enumerate its devices. It matches the spec mentioned well. A corner case occurs with legacy mode enumeration: we cannot show a prompt from enumerateDevices alone, and we cannot enumerate pipewire devices without potentially showing a prompt. So we mimic non-legacy mode by returning a single placeholder device for videoinput with empty attributes if pipewire tells us the system has cameras available.
Once Firefox has run through a successful getUserMedia request on any site, it will have gotten access from pipewire and we do our best to adhere to legacy mode enumeration.
If by "no video devices" you mean that you do not see the placeholder videoinput device with empty attributes when a camera is present on the system, that might be a bug. If so, please file a new bug.
| Reporter | ||
Comment 2•2 years ago
|
||
If by "no video devices" you mean that you do not see the placeholder videoinput device with empty attributes when a camera is present on the system, that might be a bug. If so, please file a new bug.
That is what I am seeing. This is a system with both v4l2 and pipewire cameras present, but enumerateDevices() returns two devices, both with a kind of audioinput, and no videoinput devices at all, placeholder or otherwise.
Description
•