You are not logged in.
I recently installed MPRIS together with the mpris support for MPD (mpd-mpris). However, I don't like the default behavior of always controlling the player that's found first, which is in my case always firefox. What I actually want is for MPRIS's play-pause command to control the player that is currently playing and keep a memory of which player it last controlled.
For example, if mpd is playing, play-pause should pause mpd. When I play-pause again, mpd should start playing again, unless some other player is currently playing.
I get that it's possible to achieve this with the --player argument of playerctl, but that will require non-trivial logic, so I was wondering if something like this already exists. I can't be the only one with this problem
Last edited by TheStroyer (2022-03-13 00:01:17)
Offline
Depends on the server, what are you already using as the MPRIS server provider?
Offline
you using mpdris2? i found i needed that to interact with mpd and use a widget for a player in awesomewm from worrons config
Offline
Depends on the server, what are you already using as the MPRIS server provider?
I'm not aware of MPRIS needing any server, nor do I see something about it on the wiki. I'm using playerctl as the controller and mpd-mpris as MPRIS implementation for MPD.
you using mpdris2? i found i needed that to interact with mpd and use a widget for a player in awesomewm from worrons config
Yeah you need some sort of mpris provider for MPD, as it's not built in natively, but I'm using mpd-mpris, not mpdris2. Don't think it makes a difference, though, as it seems that playerctl is the one deciding which player to control.
Last edited by TheStroyer (2022-01-05 20:50:17)
Offline
I figured out a solution that works.
From the playerctl github:
Playerctl comes with a service called playerctld that monitors the activity of media players in the background. If playerctld is running, Playerctl will act on players in order of their last activity. To start playerctld, add the following command to your system startup script:
playerctld daemon
There is an open issue about adding support for prioritizing players that are currently playing, but this should already be pretty good.
Offline