spotify-player
spotify-player copied to clipboard
On macOS automatically switch to new default sound output
Is your feature request related to a problem? Please describe. When I connect my Bluetooth headphones I expect spotify-player to switch to them automatically.
Describe the solution you'd like When I connect my Bluetooth headphones I expect spotify-player to switch to them automatically.
Describe alternatives you've considered
Keep existing behavior. Right now I have to close spotify-player and open it again after connecting to BT headphones (old way). Another way would be to use RestartIntegratedClient
, which I just discovered.
Additional context Once again, thanks for the spotify-player!
RestartIntegratedClient
is the one way that I usually use when connecting to a new bluetooth device. The command doesn't work sometimes in the first try (maybe because it takes time to retrieve the newly connected bluetooth) and I need to re-run the command.
I don't know if it's possible to listen to new bluetooth device event and implement the automatic switching logic. Will take a look.
I didn't even expect this project to support wireless devices lol.
Seems like device_type = "wireless"
doesn't do anything.
I didn't even expect this project to support wireless devices lol.
Not sure what you mean by supporting wireless devices. device_type
only changes how the client is displayed in the official application. A list of options for device_type
can be found in https://github.com/librespot-org/librespot/wiki/Options
I didn't even expect this project to support wireless devices lol.
Not sure what you mean by supporting wireless devices.
device_type
only changes how the client is displayed in the official application. A list of options fordevice_type
can be found in https://github.com/librespot-org/librespot/wiki/Options![]()
How to setup wireless connection?
I'll assume you mean hearing sound from a wireless device (bluetooth headphone). If you install the app with streaming
feature, it should use the default output device on startup (in this case the bluetooth headphone), so no need to setup anything.
Yep the problem what u got is, that u don't have probably connected properly wireless hw to your Mac or u don't have Spotify daemon or u don't have opened Spotify (the official one) + Spotify_player.
I got m1 with the newest OS and everything works correctly.
brew info spotifyd
brew services list | grep spotifyd
this should indicates if there is even chance to connect into spotify
@aome510 from what I've gathered this is the issue with audio backends.
Spotifyd folks mention librespot as being the issue. Librespot folks mention RustAudio/rodio as source of the problem: https://github.com/librespot-org/librespot/issues/547 https://github.com/RustAudio/rodio/issues/327
I will try to play around with librespot-playback versions etc to see if it is fixed with upstream master - since last tagged release is more than a year old https://crates.io/crates/librespot-playback
For now I wonder if we could implement some workaround - detecting if default output device changes and automatically restarting streaming service (RestartIntegratedClient) - not sure if it is worth in the first place though.
For now I wonder if we could implement some workaround - detecting if default output device changes and automatically restarting streaming service (RestartIntegratedClient) - not sure if it is worth in the first place though.
Would be nice improvement but for me personally, I can live w/o that feature. I also use RestartIntegratedClient to manually change the audio device when I connect to a new one. It may not work in the first try though. My guess is that it takes time for librespot
or other libraries to be notified of the new device connection.