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

Feature Request: Add support for media control #269

Closed
PopCat19 opened this issue Mar 23, 2024 · 17 comments
Closed

Feature Request: Add support for media control #269

PopCat19 opened this issue Mar 23, 2024 · 17 comments

Comments

@PopCat19
Copy link

This feature should allow spmp playback to be controlled by any hardware that uses the system media control. (e.g keyboard)
image

@toasterofbread
Copy link
Owner

toasterofbread commented Mar 24, 2024

Do you know any open-source Java applications that have this feature? I'm not entirely sure where to start, especially for Windows.

@PopCat19
Copy link
Author

Here's what I searched so far:

@toasterofbread
Copy link
Owner

That seems to be for simulating media key presses, not for detecting them.

@PopCat19
Copy link
Author

How about this library? It's windows specific though.
https://github.com/melloware/jintellitype

@toasterofbread
Copy link
Owner

That seems like it'd work for media keys, but media session won't be shared with the system like in your screenshot.

@toasterofbread
Copy link
Owner

For my own later reference, this library seems like it would work: https://github.com/Selemba1000/JavaMediaTransportControls

@toasterofbread
Copy link
Owner

The library I mentioned seems to work on Linux, but on Windows it depends on DLL blobs with no source code so I won't be able to use it until Selemba1000/JavaMediaTransportControls#1 is resolved.

@toasterofbread toasterofbread changed the title Feature Request: Add support for windows media control. Feature Request: Add support for media control Apr 7, 2024
@toasterofbread
Copy link
Owner

I've implemented media controls for the native Windows target of mediasessionkt. Support for the JVM target (and by extension SpMp) should follow soon.

@toasterofbread
Copy link
Owner

Added by dd8ac3d

@quazar-omega
Copy link

quazar-omega commented Oct 23, 2024

will this be supported on Linux too? Currently on the latest Flatpak package v0.4.1 media keys don't affect playback and it doesn't show up in the media control widget of KDE

@PopCat19
Copy link
Author

Could probably be supported with kde's plasma browser integration. Not sure about its compatibility though.

@quazar-omega
Copy link

Could you give me more info on how to do that? I haven't been able to find a web version of this app

@toasterofbread
Copy link
Owner

This is/was supported on Linux, but it seems the call to start the media session was accidentally removed in a refactor at some point. I'll see if I can add it back in later today.

@toasterofbread
Copy link
Owner

toasterofbread commented Oct 23, 2024

@quazar-omega Media session on Linux (and also Windows) should be restored by 719b646.

@quazar-omega
Copy link

quazar-omega commented Oct 23, 2024

Ah that's great, thank you!
I'll try once it's up and report back

@MohamedIraqi
Copy link

This Feature not working for me on windows 10 here I'm using v0.4.2, and the media control buttons not working either.

@toasterofbread
Copy link
Owner

toasterofbread commented Nov 17, 2024

The commit that restored this feature is not included in v0.4.2. Use an actions build or wait for the next non-hotfix release.

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

4 participants