Closed Bug 1849608 Opened 9 months ago Closed 3 months ago

Fallback to v4l2 camera backend if the pipewire backend is in use and access request failed or was rejected

Categories

(Core :: WebRTC, task, P5)

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: david.turner, Assigned: jgrulich)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

I'm testing on Debian Bookworm with Wayland, but this should work on any newish Linux system with xdg-desktop-portal installed.

Enable pipewire webcam:

  • Set media.webrtc.camera.allow-pipewire to true

Reset xdg-desktop-portal permissions:

  • Delete or rename ~/.local/share/flatpak/db/devices
  • systemctl --user restart xdg-permission-store

Now deny webcam permission

Actual results:

The following error message appears:

NotAllowedError: The request is not allowed by the user agent or the platform in the current context.

Expected results:

I would expect to still be able to select V4L2 webcams as these are not blocked by xdg-desktop-portal. While xdg-permission-store is caching the denied permission, I can't use any cameras at all until I disable media.webrtc.camera.allow-pipewire (then I can use V4L2 devices again)

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC
Product: Firefox → Core
Blocks: pipewire

There is no fallback mechanism currently. How this should work is something we need to carefully consider before enabling pipewire by default.

Severity: -- → N/A
Status: UNCONFIRMED → NEW
Type: enhancement → task
Ever confirmed: true
Priority: -- → P5
Summary: Denying camera permission in xdg-desktop-portal also blocks V4l2 webcams → Fallback to v4l2 camera backend if the pipewire backend is in use and access request failed or was rejected
Assignee: nobody → jgrulich

Fallback to V4L2 in case of a PipeWire failure. This could mean PipeWire
is not installed or not running. Also fallback to V4L2 in case camera
portal is not available or we failed to get information about available
cameras. We are not going to fallback when the camera access has been
specifically rejected or when camera portal reports there is no camera.

Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/80ea68a9b512
Fallback to V4L2 in case of broken PipeWire setup r=pehrsons
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Regressions: 1880206
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: