Server Version#: 1.29.1.6316
Player Version#: Plex HTPC 1.27.1.3311
Since the latest version of Plex HTPC was released my play/pause no longer functions properly. Checking the release notes (Plex HTPC - #26 by Moussa) I suspect “(Windows) Added support for native media keys” is causing my grief.
With this new feature enabled, if I am watching a video, when I hit play/pause on my Logitech Harmony Remote the Plex playback controls come up followed instantly by the Windows Media Key Overlay and playback does not stay paused. It very quickly flips from paused to playing again.
If I hit the ‘Ok’ button on my remote it basically presses the play/pause button in the Plex playback controls since they are on screen and the play/pause button is highlighted.
While paused, if I hit the play/pause button on my remote playback does not unpause and resume playback. It very quickly flips from unpaused back to paused. I then follow the same steps I followed to pause to unpause using the OK button and the Plex media controls.
Ironically, I had the same issue with Spotify but in their case enabling support for media keys solved the play/pause problem I outlined above.
Everything worked fine in the previous version of Plex HTPC. It would be nice if I could disable native media key support in Plex so my play/pause works again as it did before.
Interesting. I found that app too and tried it. I can’t remember my results now but I ended up getting rid of it.
I wonder if it fixed my Plex but broke my Spotify and since there are alternate ways to play/pause Plex I figured leaving it broken was the lesser of two problems.
This double key occurs 4 times in your logs. Do you have any other media keys available that you can try to see if they result in a double press as well?
I tried various buttons on my remote and none of them double press. I can skip a head/back once per press and all of the arrows (up/down/left/right) and ‘OK’ work as expected.
Attached is a image of my remote. Anything else I can try? The issue specifically occurs with the play/pause button no matter which one I press.
Yup! I should have mentioned it. I set the repeat to 0 and the problem persists. I think that setting only applies to IR though and my Harmony is using bluetooth to talk to my HTPC because I found it far more reliable.
Let me downgrade my Plex HTPC client and confirm that the issue goes away.
Likely the skip forward/back are media keys but examination of the logs would confirm (look for WindowsMediaKeysInput).
The problem is that some layer prior to the media keys reaching HTPC is duplicating the key press. From the log snippet I took out of your last logs, you can see that the second play/pause occurred 2ms after the first.
Unfortunately this isn’t going to be a long-term solution. Later versions added windows media key handling as it was much more reliable than the previous method and it isn’t going to be going away.
I also ran a test with VLC and pause/play works fine in it. The Windows Media Key Overlay (WMKO) also did not pop-up for VLC.
Spotify also works fine and the WMKO does pop-up BUT I had to enable Media Key Support in Spotify for this otherwise it play/pauses just like Plex does.
I think this might be caused due to the current Media Transport Control implementation using the old MediaControl API which Microsoft deprecated instead of the new SystemMediaTransportControl which Microsoft intends to replace the MediaControl API. This new API might have addressed this issue under the hood.
I’ve added a log line to the next version to indicate exactly what’s given by SystemMediaTransportControls to see if it doing something odd. So when that’s out a set of logs from it will hopefully be helpful.
Unfortunately this version is not new enough to contain the log line as it was already in the release process when I added the line and so it doesn’t contain the change.
From your logs, it appears your remote is (almost) always sending a play button followed by the intended action. It appears it didn’t do so with the first instance though. So when the content is playing and you wish to pause, it is send a play button presses followed quickly by a pause. In the other case where you wish to play, it sends 2 play button presses. Due to the code and media controls not always knowing if the client is playing (such as playing a photo slideshow), it always maps the play and pause buttons to the play_pause command which is why you are seeing double.
This appears to be a harmony remote. What is the exact vendor/model of the device you have mapped for this computer?