Bug 407932

Summary: Add player controls to known media players?
Product: [Plasma] plasma-browser-integration Reporter: Or Schiro <orschiro>
Component: ChromeAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED DOWNSTREAM    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Add Chrome to list of known media players?

Description Or Schiro 2019-05-25 08:30:08 UTC
Created attachment 120300 [details]
Add Chrome to list of known media players?

Dear all, 

Love your mpris implementation!

Would it be possible to add Chrome to the known media players list, however?

This would make it possible to control Chrome playback via panel plugin in Xfce, for instance. 

I know, not KDE but the extension is working well with Xfce otherwise. :-)

Attaching a screenshot for context. 

Thanks and regards!
Comment 1 Kai Uwe Broulik 2019-05-27 07:33:11 UTC
Thanks for your suggestion!

I quickly checked the source code of the xfce pulseaudio plugin and from what I can tell there is an implementation bug that prevents it from working with this extension:

The DBus service we register is org.mpris.MediaPlayer2.plasma_browser_integration. The plugin uses the last part of the service name for looking up an application .desktop file, i.e. it would look for applications/plasma_browser_integration.desktop which doesn't exist.

What it should be doing instead is read the "DesktopEntry" property on the org.mpris.MediaPlayer interface which will return the browser's desktop entry (e.g. google-chrome) and then use this for matching. This is even greater of an issue if you consider that the service name could also have a PID suffix in case of multiple player instances, so this is something that should be fixed nonetheless.

Please file a bug report against XFCE, thanks!
Comment 2 Or Schiro 2019-05-28 06:45:29 UTC
Done. Thanks Kai!

https://bugzilla.xfce.org/show_bug.cgi?id=15487