noelhibbard / node-airplayhub

AirPlay server which accepts streams and then streams the audio back out to multiple AirPlay devices with sync support.
51 stars 12 forks source link

Spotify Connect Integration #15

Open FrancisHGR opened 7 years ago

FrancisHGR commented 7 years ago

Hi Noel,

first of all: absolutely outstanding code! Helped me loads! Tried to integrate similar things 1,5 years ago but didn't make it that far, now I had some spare time again and looked your program up and it's exactly what I was looking for.

One question, I was planning to play Spotify on different Airplay speakers. For this purpose, I was thinking about piping the audio of Spotify directly on the same device (in my case: Raspberry) to your script and therefore multiple speakers. Was thinking about jusing Spotify Connect (https://github.com/Fornoth/spotify-connect-web) for that purpose, could you give me kindly some advice how to achieve it?

Best regards 7rncs

FrancisHGR commented 6 years ago

Any chance for an answer?

dersimn commented 6 years ago

You could always try to implement this yourself, but I’m sure Spotify will start to block these reverse engineered libraries some day.

FrancisHGR commented 6 years ago

Actually was able to do it...

You just need to create a Loopback device with Alsa that sends all sound to the node.js module airtunes, specifically to one of the examples in his directory: https://github.com/lperrin/node_airtunes/blob/master/examples/play_stdin.js

Then you start spotify-connect-web and acess the spotify web api via bash. From there on I was able to integrate it with my webserver or voice control or whatever...