-
Notifications
You must be signed in to change notification settings - Fork 889
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
Add support for next/previous/pause/resume global hotkeys/actions #2239
Conversation
closes #1931 right? |
It might do but I don't use linux, so I don't know if this fixes it. |
@x-N0 Could you please test if this pull request fixes your issue? |
As we haven't heard from @x-N0 yet I think you can probably review it without their response and if their issue is still not fixed that can be handled separately at a later point in time. If their issue is still not fixed by this pull request then it's either an issue with Electron or their setup. |
Is it possible for u to create a build for this so i can download it |
Here is a build for this pull request: https://github.com/absidue/FreeTube/actions/runs/2367039517 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Also wanted to confirm that this does work on Linux (Using Fedora + Gnome). I'll let others get a chance to look over this as well but I'll probably go ahead and merge this in later today.
I can confirm that this does close #1931. |
I'm going to assuming it's a compatibility issue as the code uses the standard Media Session play and pause events. At some point in the future I can create a Fedora VM and try it but no promises, as that will take a while as I've never used Fedora before and I have no idea how well Bluetooth headphones work together with VMware and Fedora. |
Warning!!! u cant pass those keys through the vm because the devs of vmware, vbox and all the other vm makers think its not a priority |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested play/pause/next track/previous track with WH-1000XM4 on MacOS 12.1
Add support for next/previous/pause/resume global hotkeys/actions
Pull Request Type
Related issue
Related to #2138
Closes #1931
Description
This pull request adds support for the global next and previous track hotkeys/actions inside of playlists. As I'm using the MediaSession API this also works with the next and previous track actions on my Bluetooth headphones.
As there have been issues with the play/pause hotkeys on non Windows operating systems in the past, I've also added explicit handlers for those. I also made it explicitly report the playback state (playing, paused, none) to the MediaSession API. I can remove these handlers and explicit reporting of the playback state if we are sure that those issues have been fully resolved.
If play/pause issues persist then we can be certain it's either Electron or more likely, an issue with something outside of FreeTube on the Linux side.
Testing (for code that is not small enough to be easily understandable)
I tested this with the next and previous keyboard buttons as well as the actions on my Bluetooth headphones. By adding log statements to the event handlers i was also able to confirm that they are removed properly when they are no longer required.
Desktop (please complete the following information):