Bluetooth media controls don't work for direct mpd playback

MAFA version: mafa-3.2.3
Android version: 16
Device model: Pixel 9
MPD version: 0.24.12

I’m running mpd locally on my phone (via termux) and for the most part it works perfectly, with MAFA being the best mpd client i’ve seen, integrating with android and hiding the client-server model.

However, while the media player notification for MAFA correctly shows whatever bluetooth device i’m using, it doesn’t react to bluetooth headset control buttons like play/pause.

My current workaround is to use an httpd output, since MAFA’s http streaming mode works fine with media buttons, but this causes wasted cpu cycles and increased latency for no reason.

I figure this can be detected automatically just by checking if one of the audio streams is SLES, or if it has a specific name like “MAFA-direct” or whatever. Or just create a switch in settings for the specific mpd server.

Thanks

MAFA doesn’t take audio focus unless it is playing the audio (HTTP streaming).
I’ll look into improving that.
Note that using the native android MPD app, it will respond to the media button on its own (but you’ll have to compile yourself since the one in the play store is out of date for more recent android versions).

Thank you for looking into it. Compiling an android app seems like more of a hassle than dealing with http latency for now :slight_smile: