music-assistant / companion

Music Assistant Companion App
https://music-assistant.io/companion-app/
Apache License 2.0
28 stars 4 forks source link

feat: Keyboard buttons for media control #34

Open miggi92 opened 1 month ago

miggi92 commented 1 month ago

Would be nice if I could use the keyboard buttons for "pause", "resume", "skip", "reverse" for controling the current media.

I'm currently using the companion with a windows 11 laptop.

arctixdev commented 1 month ago

Yeah actually I have been looking into it. We would simply have to utilize the MediaSessionAPI, but that requires playing audio in the webview which we currently arent doing since its using Squeezelite. This could be circumvented by just playing empty audio... At the moment I am very busy with exams coming up but I might be able to implement it later... Otherwise anyone else is also welcome to pick up the issue