player and ignore-player flags don't work correctly when Firefox is available as a player
I listen to music either through Spotify or audacious, and I don't want my media keys to be able to control Firefox. So I've bound this command to my media keys:
playerctl --ignore-player=firefox play-pause
plus variants for previous and next.
This has worked perfectly for a long time. However, several weeks ago, I've noticed that play-pause was suddenly able to affect Firefox, despite the --ignore-player flag.
It also appears to take priority over any other opened players. If Firefox is running, and it has any tab with playable media opened, my play-pause command will control Firefox, no matter what. Only if Firefox is closed, or has no tabs with media, will the command be able to control Spotify or audacious.
The previous and next commands still function correctly. But it's possible that this is only because Firefox doesn't accept these commands.
I tried to fix this by, instead of excluding firefox, specifying only audacious and Spotify:
playerctl --player=audacious,spotify play-pause
Sadly it doesn't work. This command should not speak to any players that aren't audacious or Spotify, but it can still control Firefox, and will prioritize Firefox if available.
Both the ignore-player and player flags appear to work correctly with other players. I've tested this by keeping Firefox closed and putting various different players including spotify, audacious, vlc, and mpv in the flags. Only Firefox seems to be affected by this issue.
Seems like a local problem. This works with an open youtube tab. Note about the --player= instead of --ignore-player= which makes certain you are sending the command to the correct player regardless of the current order of playerctl --list which otherwise has to be changed with playerctld shift 🙊 ...
% playerctl --list-all
spotify
firefox.instance_1_438142
mpd
chromium.instance1402327
% playerctl --player=$(playerctl --list-all|grep -m1 '^firefox') play-pause
I think you should get an error response like this if a player doesn't support the command..
% playerctl --player=$(playerctl --list-all|grep -m1 '^firefox') position 3-
No player could handle this command