Bug 230420 - [GTK] WebKit tries to own org.mpris.MediaPlayer2 bus names even when MEDIA_SESSION disabled
Summary: [GTK] WebKit tries to own org.mpris.MediaPlayer2 bus names even when MEDIA_SE...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Patrick Griffis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-17 11:54 PDT by Patrick Griffis
Modified: 2021-09-18 09:12 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.86 KB, patch)
2021-09-18 08:07 PDT, Patrick Griffis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Griffis 2021-09-17 11:54:32 PDT
If you build webkitgtk without `ENABLE_MEDIA_SESSION` defined you will get warnings:

> ** (WebKitWebProcess:2): WARNING **: 13:27:52.167: Unable to acquire MPRIS D-Bus session ownership for name org.mpris.MediaPlayer2.org.webkitgtk.MiniBrowser

This is because in `BubblewrapLauncher.cpp` the dbus permission is guarded behind `ENABLE(MEDIA_SESSION)`.

At a glance I wasn't sure the best place to disable the MPRIS ownership with another guard, most of the PlatformMediaSessionManager code seems to be guarded by `ENABLE(MEDIA_STREAM)` instead.
Comment 1 Philippe Normand 2021-09-17 14:17:43 PDT
MEDIA_SESSION != MEDIA_STREAM.
What if you guard MediaSessionManagerGLib and RemoteCommandListenerGLib with ENABLE(MEDIA_SESSION)?
Comment 2 Patrick Griffis 2021-09-18 08:07:19 PDT
Created attachment 438559 [details]
Patch
Comment 3 Patrick Griffis 2021-09-18 08:07:51 PDT
That seemed to work, see attached patch.
Comment 4 EWS 2021-09-18 09:12:54 PDT
Committed r282727 (241864@main): <https://commits.webkit.org/241864@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438559 [details].