Can't control with bluetooth AVRCP controls via mpris-proxy
See original GitHub issueHello, thanks for writing this awesome TUI player, I use it everyday while I work and am super appreciative of your work!
Just wanted to log an issue I came across while playing with my new bluetooth headphones. According to the Arch wiki, bluetooth device AVRCP controls can be forwarded to players via MPRIS using the mpris-proxy
tool included in bluez-utils
. However, when I run mpris-proxy
, I’m getting the following message:
org.bluez appeared
Bluetooth Adapter /org/bluez/hci0 found
player org.mpris.MediaPlayer2.tuijam at :1.68646 found
Can't register player
Operation is not supported
Bluetooth Transport /org/bluez/hci0/dev_38_18_4C_10_57_8C/sep1/fd0 found <-- this is my headset connecting
Digging through the source of mpris-proxy
led me to believe that something with the RegisterPlayer
message is off and causing bluez to fail to register the player here. I also found this commit to another project that might hold a clue to the solution. But for all I can tell from reading the MPRIS spec, nothing really seems to be missing.
Obviously this is just a quality of life improvement and not a huge issue, but was curious if anyone knew how to solve this.
If it helps, here is the output of busctl
while monitoring mpris-proxy
:
‣ Type=method_call Endian=l Flags=0 Version=1 Priority=0 Cookie=57
Sender=:1.17312 Destination=org.bluez Path=/org/bluez/hci0 Interface=org.bluez.Media1 Member=RegisterPlayer
UniqueName=:1.17312
MESSAGE "oa{sv}" {
OBJECT_PATH "/_1_10513";
ARRAY "{sv}" {
DICT_ENTRY "sv" {
STRING "PlaybackStatus";
VARIANT "s" {
STRING "Stopped";
};
};
DICT_ENTRY "sv" {
STRING "Rate";
VARIANT "d" {
DOUBLE 1;
};
};
DICT_ENTRY "sv" {
STRING "Metadata";
VARIANT "a{sv}" {
ARRAY "{sv}" {
};
};
};
DICT_ENTRY "sv" {
STRING "Volume";
VARIANT "d" {
DOUBLE 1;
};
};
DICT_ENTRY "sv" {
STRING "Position";
VARIANT "x" {
INT64 0;
};
};
DICT_ENTRY "sv" {
STRING "MinimumRate";
VARIANT "d" {
DOUBLE 1;
};
};
DICT_ENTRY "sv" {
STRING "MaximumRate";
VARIANT "d" {
DOUBLE 1;
};
};
DICT_ENTRY "sv" {
STRING "CanGoNext";
VARIANT "b" {
BOOLEAN true;
};
};
DICT_ENTRY "sv" {
STRING "CanGoPrevious";
VARIANT "b" {
BOOLEAN true;
};
};
DICT_ENTRY "sv" {
STRING "CanPlay";
VARIANT "b" {
BOOLEAN true;
};
};
DICT_ENTRY "sv" {
STRING "CanPause";
VARIANT "b" {
BOOLEAN false;
};
};
DICT_ENTRY "sv" {
STRING "CanSeek";
VARIANT "b" {
BOOLEAN false;
};
};
DICT_ENTRY "sv" {
STRING "CanControl";
VARIANT "b" {
BOOLEAN true;
};
};
};
};
‣ Type=error Endian=l Flags=1 Version=1 Priority=0 Cookie=6076 ReplyCookie=57
Sender=:1.12 Destination=:1.17312
ErrorName=org.bluez.Error.NotSupported ErrorMessage="Operation is not supported"
UniqueName=:1.12
MESSAGE "s" {
STRING "Operation is not supported";
};
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
I was able to play around with this with a set of bluetooth headphones I have and made a few observations.
First, with no modifications from the latest release of TUIJam, mpris-proxy doesn’t complain about being able to register the player.
My headset has a play/pause button and two volume control buttons. The play/pause button seems to do nothing and while the volume control buttons audibly change the volume of the playback, this isn’t reflected in either the TUIJam volume control or my GNOME system volume.
Second, I added the
org.bluez.Media1
interface to TUIJam and tested again. Doing this seems to have no effect on the behavior previously observed. I then used d-feet to compare the D-bus interface that TUIJam is producing with the Gnome music player (which does seem to work fine with mpris-proxy). I found that there were a few properties from the spec that TUIJam didn’t implement. I added them, and now at least the play button works on my headset.Can you try checking out the latest version and see how it behaves on your system?
Found a post on the Arch forums with a similar issue: https://bbs.archlinux.org/viewtopic.php?pid=1884292
Anyways, definitely seems like it’s not a tuijam issue. Thanks anyways for helping me dig @cfangmeier!!