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 playback keys no longer detected #1546

Open
3 tasks done
Cre8or opened this issue Sep 14, 2024 · 4 comments
Open
3 tasks done

Media playback keys no longer detected #1546

Cre8or opened this issue Sep 14, 2024 · 4 comments

Comments

@Cre8or
Copy link

Cre8or commented Sep 14, 2024

  • I have checked the FAQ for answers.
  • I have checked the Changelog that the issue is not already fixed.
  • I believe this issue is a bug, and not a general technical issue, question or feature requests that can be discussed on the forum.

Describe the bug
I'm vaguely paraphrasing, but it seems that a KDE update has changed how events related to media controls are dispatched, and Strawberry is not aware of this change (yet). The behaviour described in this issue over at the KDE bug tracker closely matches my issue:

  • Strawberry can be paused via media shortcuts, but not resumed
  • Strawberry no longer skips songs in the playlist via media shortcuts ("previous"/"next")

None of these problems seem to occur when I start Strawberry without any additional file arguments (think "double-clicking" the desktop shortcut), and then play music. The issue only occurs when I double-click a music file, which KDE then opens via Strawberry (thus passing the file path as argument).

My Strawberry/KDE shortcuts are set to default keybindings.

To Reproduce

  • Ensure Strawberry is not open
  • Open a media file with Strawberry (right click -> open with, or any similar method in your distro, so long as Strawberry opens the file immediately on startup)
  • Start the first song (if it isn't playing yet)
  • Use the system's "Media Play" shortcut key to pause the currently playing song
  • Use that same key again to resume the song
  • Notice that the song has not resumed
  • Manually resume the song via the Strawberry player's UI
  • Use the system's "Next track" shortcut key to jump to the next song
  • Notice that the playlist hasn't skipped to the next song, and is still playing the first song
  • Close Strawberry, and manually reopen it without any file arguments (e.g. desktop shortcut)
  • Repeat the above steps and notice the media keys now work again

Expected behavior
The listed media buttons should work irrespective of how Strawberry was opened.

Screenshots:
image

System Information:

  • Operating system: Arch Linux 6.10.9-arch1-2 / KDE Plasma 6.1.5
  • Strawberry Version: 1.1.2

Additional context
I suspect there is a problem with how Strawberry detects keypresses, as if I rebind the media shortcuts to miscellaneous keyboard buttons (e.g. J / H / K / etc.), I can use these buttons as expected. Specifically the media buttons seem to be the issue. In fact, when I attempt to rebind these keyboard buttons back to the proper media buttons, the window prompting me for a keybind does not register anything, and remains empty:
image

See https://bugs.kde.org/show_bug.cgi?id=490569

@jonaski
Copy link
Member

jonaski commented Sep 14, 2024

I've tested global shortscuts on KDE using KGlobalAccel, 3 different keyboard, it's working fine here. KDE Plasma 6.1.5 and KDE Frameworks 6.5.0. I didn't change anything that should affect global shortcuts in version 1.1.2 either.
I suspect this is something to do with the KDE configuration.

@Cre8or
Copy link
Author

Cre8or commented Sep 14, 2024

Bit ashamed to admit it, but after a reboot, the issue is now gone. I don't know why the thought hadn't crossed my mind sooner... 😬

Sorry for wasting your time!

@Cre8or Cre8or closed this as completed Sep 14, 2024
@Cre8or
Copy link
Author

Cre8or commented Sep 18, 2024

Hmm, seems like the issue is back, and I can narrow it down to a reproducible error - even across restarts.

When I open Strawberry without passing a media file as argument, the media keys work as expected. I can then add music to it (drag&drop, loading a playlist, etc.) and use it as expected.

If I however open Strawberry by double-clicking a music file (thus launching Strawberry with a file argument), the media key issues as originally described appear. So it effectively comes down to how I launch the application.

I have done a system update and am still on Strawberry 1.1.2 at this time.

EDIT 1: It seems like this issue only occurs on KDE. I originally thought it might be caused by the .desktop file, but now I'm not so sure anymore...

EDIT 2: The same behaviour/issue is occuring with VLC, with the same behaviour regarding opening files! Sounds like it's related to the KDE media playback tray widget. There's an ongoing discussion about it over at the KDE bug tracker.

@Cre8or
Copy link
Author

Cre8or commented Sep 22, 2024

I'm reopening this issue as the problem still persists in Strawberry v1.1.3.

@Cre8or Cre8or reopened this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants