Plexamp does not listen to hardware media control buttons

Server Version#: 1.25.8.5663
Player Version#: Plexamp 4.2.1.324000497

I’m running Plexamp from an Android (9.1) car head unit. I recently hooked up connections for steering wheel controls, configured to be for play/pause, next track, previous track, and volume up/down. When testing these controls with other apps, such as YouTube and the built-in audio player, functionality works as expected. With Plexamp running, the play/pause, skip track, and next track buttons do not work.

I was told on Twitter to try pressing the buttons, then create a log. I pressed each button (play, next track, previous track) four times, then exported the logs.

I also created a short video on Twitter describing the issue.

I also found a related Android Developers article on media controls.

ZIP them beforehand.

I am trying to upload the zip file containing 6 log files, titled “1792669943642.zip”

“Sorry, there was an error uploading that file. Please try again.”

Try to be more patient before hitting the Post button. It takes a while before the file is ready.
Disable web browser add-ins which could interfere with proper function of the forum.

1792669943642.zip (109.8 KB)

Related issue as well: Plexamp on Desktop (Linux 5.17.5-arch1-1, Plexamp 4.2.1) will not respond to keyboard media controls (play/pause, next track, previous track) either. Pressed each key three times, then exported logs.
Plexamp linux logs.zip (244.0 KB)

We have implemented the media session API. It works for Android Auto/bluetooth scenarios, and I just tested plugging a keyboard into my Android phone and the hardware media controls work fine in Plexamp.

Unfortunately the logs don’t show any key events getting to our app, so there must be something specific about the button presses from your steering wheel that Plexamp needs to handle.

A few things to try:

Apologies for the late reply! Here’s what I got:

Steering wheel controls: MODE is set to Play/Pause, CH+/- set to Next Track, Previous Track
In the key event display app: MODE gives code 85, CH+ code 87, CH- code 88. All buttons are working.
Tested with a USB keyboard plugged in. Same codes are thrown when the media keys are pressed. Working fine too.

Under Plexamp, no keys are detected, either from steering wheel, or USB keyboard.
Under Plex app, play/pause functions as expected on both steering wheel and USB keyboard. Next Track/Previous Track does detect the keys, but instead of skipping tracks, it skips one second back and forth?

So the Plex app is at least detecting the keys properly, but not doing the expected behavior for next/previous. Plexamp just either ignores the keys altogether or isn’t detecting them. Tested media keys on keyboard on Linux Plexamp, also not detecting anything.

I tried connecting the USB keyboard to my phone and the media keys worked with Plexamp there. Plex app also gave the same issue as in the car, where Play/Pause works, but Next/Previous track skips single seconds rather than tracks. Is there possibly some compatibility issue that the media keys are working on Android 12, but not Android 9 and Linux?

I recorded a video of all my findings. They’re on Google Photos.

Thanks, I will look at what the difference is between how Plexamp and Plex on Android handle the key events :smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.