Bug 302771 - [PulseAudio] Enable MPRIS2 media controls in Volume Control popup
Summary: [PulseAudio] Enable MPRIS2 media controls in Volume Control popup
Status: RESOLVED INTENTIONAL
Alias: None
Product: kmix
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: HI wishlist
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-29 22:20 UTC by Dotan Cohen
Modified: 2023-06-17 07:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13


Attachments
Screenshot of kmix (31.07 KB, image/png)
2013-11-27 22:07 UTC, Méven Car
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dotan Cohen 2012-06-29 22:20:27 UTC
When clicking on the Volume Control icon in the system tray, it would be nice if there were simple media controls on the popup. For instance, Play/Pause and Forward/Back one track.
Comment 1 Jekyll Wu 2013-01-23 14:59:21 UTC
Suppose you mean kmix by "Volume Control icon in the system tray" .
Comment 2 Christian Esken 2013-02-04 19:28:25 UTC
Media controls are already available, see http://kmix5.wordpress.com/2012/09/24/more-consistent-gui-and-updates-to-the-soundmenu/

It is only available when your system is not running PulseAudio. There is also an unsupported mode for PulseAudio + MediaControls, but you are on your own there. Bug reports are not accepted for this mode. To enable that, execute the following from a konsole window:

killall kmix; sleep 2;
kwriteconfig -file kmixrc -group Global -key Backends -type string PulseAudio,MPRIS2
sleep 1 ; kmix
Comment 3 Dotan Cohen 2013-02-05 05:54:22 UTC
Thank you Christian. Why was this bug marked "WORKS FOR ME" when it only works when:
1) The user switches from the default, common Linux audio infrastructure in most distros to an unsupported audio infrastructure,
-or-
2) The user switches to an "unsupported" mode which is expected not to work and does not even accept bugs.

The "ME" in "WORKS FOR ME" might be able to reconfigure his sound system or be willing to use unsupported software. But the "me" who filed this bug has the intention of making KDE better for casual users, who wish to use supported software without replacing large parts of their operating system. Please reconsider the status of this issue.

Thank you.
Comment 4 Christian Esken 2013-02-05 08:03:35 UTC
OK. Changing resolution.
Comment 5 Christian Esken 2013-02-22 23:12:49 UTC
Thanks for your words, Dotan.
It needed some tome to sink in my mind, but I am rethinking my resolution. It is in theory possible to exchange the PulseAudio Playback Streams with MPRIS2 Playback Streams. Hmm, I start to like this idea. Very much.
Thanks again.
Reopening.

---Work note -----------------------------
 - Backend selection has to change (Allow PA + MPRIS2 together)
 - Add option to select either PA or MPRIS2 playback streams (not both: thats confusing => unsupported option)
Comment 6 Dotan Cohen 2013-02-22 23:31:33 UTC
Thank you Christian!
Comment 7 Christian Esken 2013-07-20 09:32:43 UTC
Work notes:
1) Cold plugging with MPRIS2 is now asynchronous, and thus effectively changed to hotplugging. Will this affect this feature? Not sure yet. At least, likely it will only be used if the user explicitly configures it.
2)  Removing PA streams might also confuse users, because "PA streams" and "MPRIS2 controls" are not at all 1:1. Many streams might be "missing", e.g. from Firefox.
Comment 8 Méven Car 2013-11-27 22:07:44 UTC
Created attachment 83802 [details]
Screenshot of kmix

This is what i get after running :
killall kmix; sleep 2; kwriteconfig -file kmixrc -group Global -key Backends -type string PulseAudio,MPRIS2 sleep 1 ;

As you can see the controls appear but only in the application not in the tray unorfunately.
I feel like it is almost there, the controls work properly and all.

I run kubuntu 13.10 with KDE 11.2.
Comment 9 Christian Esken 2014-01-05 20:03:34 UTC
Tray should work properly with KDE4.12. Will be even better with KDE 4.13.

My issues from comment #7 are unfortunately still valid:
   Removing PA streams might also confuse users, because "PA streams" and "MPRIS2 controls" are not at all 1:1. Many streams might be "missing", e.g. from Firefox.
Not easy to get this right ...
Comment 10 Jonathan Marten 2023-06-17 07:58:11 UTC
PulseAudio+MPRIS2 controls together can now be selected by command line arguments, either with "--multidriver" or explictly with "--backends PulseAudio,MPRIS2".  This may be easier than editing the KMix configuration file.  Using both backends together appears to work with those applications that I have been able to test, but as pointed out in comment #7 there is no correspondence between PA streams and MPRIS2 controls so in general the two could not be combined and shown in a single GUI element.  

Therefore I intend to close this bug as INTENTIONAL unless someone can find a technical solution to reliably associate a MPRIS2 control with its corresponding PulseAudio stream.

Comment #8 regarding not all PA devices appearing in the tray popup has now been resolved, see bug 394751.