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

Integrate with mediakeys dbus extension (MPRIS) #4080

Open
1 task done
Gottox opened this issue Jun 10, 2023 · 1 comment
Open
1 task done

Integrate with mediakeys dbus extension (MPRIS) #4080

Gottox opened this issue Jun 10, 2023 · 1 comment

Comments

@Gottox
Copy link

Gottox commented Jun 10, 2023

Thanks for scrcpy! I'm always surprised how seamless this tool works!

Is your feature request related to a problem? Please describe.
With the introduction of audio forward in scrcpy 2.0, I want to start using my smartphone as my main media player. While sound and mouse/keyboard control works nicely I wished that it could integrate with my Linux Desktop even better.

Describe the solution you'd like

It would be awesome if scrcpy could interact with the MPRIS interface to support media buttons and maybe even report the current play state/artist/title from android (I'm not sure if that's possible though)

Describe alternatives you've considered

Currently I'm using the spotify webinterface as kind of "remote control" to make the media buttons work on linux. While this is enough for my use case, it is clumsy and only works with spotify.

@AzlanCoding
Copy link

AzlanCoding commented Jun 11, 2024

Hello, it's been a year.

I too use my smartphone as my main media player and really wanted this feature. So I wrote a python script to help forward mediakeys in the dbus extension to the media key controls on the phone. Check out here and let me know what you think about it.

Screenshot of scrcpyMediaController in use

I wrote this script when I got tired studying for Organic Chemistry in preparation for my GCE O-Level examination. Slowly, I kept fixing some bugs until I was satisfied with it. I might compile a proper release binary or maybe even learn C and make a pull request to scrcpy after my exams.

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