You can turn your sailfish device into a Spotify Connect Player using Librespot. (For as long as Spotify supports the old api.)
When building LibreSpot you get an executable that can be used as a Spotify Connect Player. It shows up in the Spotify app and webbased player. With some luck it also appears in the list received with getMyDevices (web api).
On OBS you can find a package to install it on Sailfish. It also installs a systemd service file but librespot
is not started automatically. To start it use systemctl --user start librespot
. Edit /etc/default/librespot
to suit your needs. If you do want to have it start at boot see the last lines in /etc/systemd/user/librespot.service
.
Note that after installation pulseaudio
needs to be restarted, see below.
Getting cross-compiling working with pu