plexinc / plex-media-player

Next generation Plex Desktop/Embedded Client
GNU General Public License v2.0
1.16k stars 170 forks source link

Plex for Windows hijacks media controls when not the active window #979

Open TechGeek01 opened 4 years ago

TechGeek01 commented 4 years ago

This is affecting Plex for Windows, not the original Plex Media Player. I was unable to find a place to post issues for Plex for Windows. If there's a better place to post this, let me know!

Test environment

PMS Version: 1.19.5.3112 Ples for Windows Version: 1.16.0.1364-da192ff7 Platform (Windows/macOS/Embedded RPi/Embedded Intel): Windows

Steps to reproduce

  1. Open Plex for Windows after already having Spotify open (this probably occurs with other media players as well, but I use Spotify's desktop app), and Plex hijacks media controls, despite being told this was fixed.
  2. If you close playback of something, Plex for Windows stops controlling these controls. The current fix when opening Plex after Spotify is to start playing something, and immediately click the X in the bottom controls to close it. Then, Spotify will be able to be controlled via media controls.

The intent here is that music is a background thing. Movies and TV aren't, so there's no real reason that Plex should hijack controls for movies or TV unless it's the current active window.

Current behavior

  1. Media controls are hijacked by Plex for Windows, even when it's not the active window.

Expected behavior

  1. Media controls should control media when Plex for Windows is the active window, if there's media playing. If not, it shouldn't hijack controls.
mseeley commented 4 years ago

The expected behavior you described is subjective and would break all background video and music control. Regardless, I think we can agree that it doesn't make sense to claim media keys when not playing media.

The current fix when opening Plex after Spotify is to start playing something, and immediately click the X in the bottom controls to close it. Then, Spotify will be able to be controlled via media controls.

I've reproduced this too. This points to an issue with our initial state. Unless we're playing we shouldn't be consuming media keys.

TechGeek01 commented 4 years ago

Along that subject, can we agree that media controls, at least for movies and TV, should also not be consumed when it's minimized?

I don't know how your code works or if that would break something, but if you can avoid consuming media controls for movies and TV when the video playback is minimized, while still allowing it for music, that would also be something to consider.

I should note, I don't use Plex for my music just yet, so this doesn't affect me either way, but when playing a movie or something, if I don't have it viewable, when I'm navigating other menus or something, and the only reference I have is the thumbnail in the controls at the bottom, it doesn't make sense for media keys to control those, since you can't see anything anyway until I click to expand it again.

I hope that makes sense!

OttoKerner commented 4 years ago

Unless we're playing we shouldn't be consuming media keys.

This'd render the "Play" button useless.

TechGeek01 commented 4 years ago

When it's collapsed, you could still click on it. It just doesn't make a whole lot of sense for the media keys on my keyboard to play a movie I'm in the middle of when I can't see ir on the screen because I'm navigating through settings or something.

I do realize that's an issue that's open to interpretation. I mainly wanted to point out the problem with the initial state consuming them before I play something.

mseeley commented 4 years ago

It just doesn't make a whole lot of sense for the media keys on my keyboard to play a movie I'm in the middle of when I can't see ir on the screen because I'm navigating through settings or something.

I see your point; I don't typically listen to movies without watching them too. Keep in mind video as a media type can have varied purposes. For example, it's entirely reasonable to listen to video lectures or music performances in the background while expecting to control playback with media keys.

I appreciate you filing this issue and the discussion within. We'll get the initial state sorted for sure. Once playback begins we'll continue to leverage the media keys. :+1:

TechGeek01 commented 4 years ago

Awesome! By the way, is this the proper place for Plex for Windows? It seems to be, but given it's called "plex-media-player" I wasn't sure if there was a better place to post issues about it.

mseeley commented 4 years ago

Technically... no, but, it happens quite often. 😄 I view it as our problem to deal with supporting multiple media player applications for Windows and Mac.

If you're looking for discussion or have "soft" issues, the forums are the best place to chats. If you have a clearly reproducible defect then this is a fine place to report it.

TechGeek01 commented 4 years ago

Good to know! By the way, what's the reasoning for maintaining a separate Windows version under a different name, as opposed to having one version of the player consistent across platforms? I'd heard stuff about home theater vs desktop PC floating around on Reddit and such, but nothing official.

mseeley commented 3 years ago

Linking to a similar forum thread: https://forums.plex.tv/t/disable-media-keys-on-windows/691875