Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media keys status do not reflect in the app #476

Closed
akelge opened this issue Jan 28, 2024 · 5 comments · Fixed by #512
Closed

Media keys status do not reflect in the app #476

akelge opened this issue Jan 28, 2024 · 5 comments · Fixed by #512
Assignees
Labels
bug Something isn't working

Comments

@akelge
Copy link

akelge commented Jan 28, 2024

Expected Behavior

Pressing the play/pause key on my keyboard should make Feishin change state and the play/pause button in the bottom play bar should reflect the status of the application, same goes for the window title, that should add (Paused) when the app switch to pause mode and remove (Paused) when the app start playing music

Current Behavior

When I press the play/pause key, Feishin behaves correctly, but the play/pause button inside the application does not reflect the current status.

If Feishin was playing the play/pause button remains with the pause symbol (||), and the other way around. Also the window title does not change to (Paused) when pausing or does not remove (Paused) when starting to play again.

Steps to Reproduce

  1. Press play button in the bottom bar, music starts playing;

  2. Press play/pause key on mac keyboard, music pauses;

  3. Play/pause button in the bottom bar remains with pause symbol;

  4. (Paused) is not added to the title bar;

Possible Solution (Not obligatory)

I suspect that Feishin appearance is not in sync with the actual status

Context

Apparently this is not a big deal, but if I pause using the keyboard and then I wish to start play using the application, I have to press twice on the play/pause button, once to set it to play icon, then another time to actually start playing.

Your Environment

  • Application version (e.g. v0.1.0) : 0.5.3
  • Operating System and version (e.g. Windows 10) : macOS Sonoma 14.3 (23D56)
  • Server and version (e.g. Navidrome v0.48.0) : Navidrome 0.51.0
@akelge akelge added the bug Something isn't working label Jan 28, 2024
@akelge
Copy link
Author

akelge commented Jan 28, 2024

I just tried to disable Global media hotkeys in settings, but nothing changed: media keys keep controlling Feishin and the status is not coherent

@patrick-motard
Copy link

I was about to write up a bug report for this. Glad I'm not the only one experiencing it. Thanks for writing this up @akelge!

@kgarner7 kgarner7 self-assigned this Feb 15, 2024
@iiPythonx
Copy link
Contributor

iiPythonx commented Feb 16, 2024

Not seeing this issue with either mpv or web on the latest commit (on Windows and Arch).

@kgarner7
Copy link
Collaborator

I am able to reproduce this on Ventura (13.5.2) with MPV backend. What I suspect is happening is that the pause/play event is going. It looks like for MPV the play-pause is going to MPV (and not caught by Feishin), whereas for web (at least in my case), Feishin isn't capturing it at all

@kgarner7
Copy link
Collaborator

For MacOS (13/14) it is required to be a trusted accessibility client (https://www.electronjs.org/docs/latest/api/system-preferences#systempreferencesistrustedaccessibilityclientprompt-macos) before it will allow controlling via media keys. In the case of MPV, without this the pause/play are going directly to MPV and bypassinf Feishin. I'll add a prompt when enabling shortcuts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants