Closed Bug 1675764 Opened 4 years ago Closed 4 years ago

[Wayland] Update PipeWire sharing dialog

Categories

(Core :: WebRTC, enhancement)

Desktop
Linux
enhancement

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox84 --- wontfix
firefox85 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

Right now PipeWire sharing dialog contains empty place where window name is supposed to take place. It's because Wayland/PipeWire does not allow to select what is shared by application but by user at portal dialog.

We need to remove the place or put some meaningful info there.

Attachment #9186237 - Attachment is obsolete: true
Attachment #9186237 - Attachment is obsolete: false

I think we may remove the dropdown menu with window options completely when PipeWire is used and use the system PipeWire portal dialog only.
There's also a bug that user needs to confirm the screen sharing twice on the PipeWire portal dialog - once when a screenshot is generated and when when actual screensharing is performed.

Well, wouldn't it be nice to have the possibility to share a tab too, like Chrome does? In which case we would need the drop-down...
But I agree, it's pretty useless as it is now.

(In reply to Francois Guerraz from comment #3)

Well, wouldn't it be nice to have the possibility to share a tab too, like Chrome does? In which case we would need the drop-down...
But I agree, it's pretty useless as it is now.

If we want to share a tab, the tab needs to be exposed to PipeWire and selected there in system share dialog.
AFAIK Chrome does not provide such capability on Wayland/PipeWire, Firefox is ahead here.
I'll attach a screenshot how it looks like.

Edit: https://bugzilla.mozilla.org/attachment.cgi?id=9186238 shows the windows which can be shared. We can add actual Firefox tabs there.

I don't think that Chrome goes via the compositor or display server to share a tab, it's shares its own internal framebuffer and there is no UI interaction with PipeWire

(In reply to Francois Guerraz from comment #5)

I don't think that Chrome goes via the compositor or display server to share a tab, it's shares its own internal framebuffer and there is no UI interaction with PipeWire

AFAIK Chrome uses PipeWire on Wayland but supports 0.2 only right now.

When we share content by PipeWire, a system portal is used to select which content is shared.
In that case put only PipeWire portal name placeholder to device list.

Maybe this is a dumb question - but should the option in the drop down reference Pipewire? Do many users even know what Pipewire is? Would there be a downside to writing "Use System Dialog"? Or perhaps even better, since the Pipewire dialog is titled "Screen Share", perhaps it would be more cohesive for the option to say "Use Screen Share Dialog".

(In reply to Tyler Jones from comment #10)

Maybe this is a dumb question - but should the option in the drop down reference Pipewire? Do many users even know what Pipewire is? Would there be a downside to writing "Use System Dialog"? Or perhaps even better, since the Pipewire dialog is titled "Screen Share", perhaps it would be more cohesive for the option to say "Use Screen Share Dialog".

Sure, that's a good point.

When screen sharing preview is generated a system dialog is fired and the same system dialog
is fired again when an actual sharing is performed.

Shared resource is selected by system dialog only, we don't have any control which system resource
will be shared over PipeWire. So there's no point to generate a preview of a resource which may not be shared
as an user can select a different resorce.

The preview should be generated by system dialog where the shared resource is selected and confirmed,
we only consume that user selection.

Depends on D96694

Filed the screen preview request at xdg-desktop-portal level here :
https://github.com/flatpak/xdg-desktop-portal/issues/544

Sorry I'm coming in cold as a reviewer and don't use Linux on the regular. Work here is limited to Linux desktop, correct? I noticed none of the bugs in the dependency tree were marked as such in Bugzilla, which might help clarify scope.

OS: Unspecified → Linux
Hardware: Unspecified → Desktop

There's a screen cast how the pipewire screen sharing looks like with the patches here:

http://people.redhat.com/stransky/pw/pipewire-screen-share.webm

See the system dialog where user select resource for share (screen or a single window).
There's also system icon in right-upper corner that system sharing is active.

(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #14)

Sorry I'm coming in cold as a reviewer and don't use Linux on the regular. Work here is limited to Linux desktop, correct? I noticed none of the bugs in the dependency tree were marked as such in Bugzilla, which might help clarify scope.

Yes, this is Linux only.

(In reply to Martin Stránský [:stransky] from comment #6)

(In reply to Francois Guerraz from comment #5)

I don't think that Chrome goes via the compositor or display server to share a tab, it's shares its own internal framebuffer and there is no UI interaction with PipeWire

AFAIK Chrome uses PipeWire on Wayland but supports 0.2 only right now.

To prove my point, I removed the pipewire libraries from my system and launched chrome with wayland support
google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland
Chrome was unable to share the screen or a particular window, but tab sharing was still working.

It is their recommended sharing mechanism especially if there are animations or videos, and it's lighter on resources. I still think it would be great to implement something similar with FF.

(In reply to Francois Guerraz from comment #18)

It is their recommended sharing mechanism especially if there are animations or videos, and it's lighter on resources. I still think it would be great to implement something similar with FF.

Please file a new bug for it, I don't think it's related to PW or this bug.

I guess this is already captured in bug 1646597
My point was that this should be taken into consideration when updating the sharing dialog.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b43a33fe02b1
[Wayland] Use explicit PipeWire entry at screen sharing dialog when PipeWire is used, r=dminor,jib,johannh
https://hg.mozilla.org/integration/autoland/rev/66652fd0a9b8
[Wayland] Don't use screen sharing preview with PipeWire, r=jib
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: