mirobouma / MusicControl

Spotify music control plugin for https://github.com/SteamDeckHomebrew/decky-loader
MIT License
21 stars 3 forks source link

[Suggention] Control incoming music via Bluetooth #9

Open DJkefo opened 1 year ago

DJkefo commented 1 year ago

I just realized you can connect your phone to your steamdeck and play the music from your phone on the steamdeck. If you would have the ability to control the music player on your phone with the plugin, that would be really nice.

moraroy commented 1 year ago

yes please!

mirobouma commented 1 year ago

Not sure how the bluetooth control works in linux, but theoretically an application that recognizes the bluetooth device and mpris should work. Maybe you can try running mpris-proxy in the background? I don't have availability to look into it at the moment but will keep the ticket open for the future.

moraroy commented 1 year ago

@mirobouma @DJkefo so.. I was able to get this working but I have good news and bad news.

  1. I downloaded and installed Bluez package and Bluez-utilz following this guide.

https://denzveloper.github.io/BT-MPRIS/

Once I enabled the mpris-proxy.service, I turned my Bluetooth on my phone and went into game mode on the steamdeck.

Once they were connected to each other I played a spotify song on my phone.

20230310_033436.jpg

it works! Except the only buttons that work are "Skip Left and Skip Right" the "Play/Pause" button works but is reversed for me. The volume control inside of "Music Control" doesnt work nor does the "fast forward bar". The songs also do not display meta info on the current song playing... that's as far as I got but it does work somewhat and I don't even have to have spotify open it just plays which is nice.

moraroy commented 1 year ago

@DJkefo @mirobouma

I'm making a new comment here to also let you know using KDE Connect in game mode works with music control alot nicer.

20230310_033503.jpg

It recognizes the phone name instead of just "player" and all of the controls work and Metadata shows.

20230310_033515.jpg

The caveat here though is you have to keep KDE Connect on your android phones screen in order for this to work and you have to turn it on in game mode and if you restart your steam deck you have to go into desktop mode in order to turn it back on which is annoying. That's all the testing I was able to do though. Haha

moraroy commented 1 year ago

@DJkefo @mirobouma

Update

It turns out once I started that service there ended up being 2 "mpris-proxy.service" running in game mode. This was causing the errors I was getting.. now everything works except the volume control and the progress bar and I'm getting meta data as well.. I suspect I should not have updated my Bluetooth package and just installed "bluez-utils" only. In any case I can control the music now without Spotify on the steam deck but there is still things to fix.

DJkefo commented 1 year ago

Good Job, I can work without a progress bar or volume control, my phone should be close by when I'm playing on the deck.

Really well done, I'm looking forward to see your work in action, that's really impressive :D