libspotify and the old iOS Spotify SDK used to provide the ability to stream and play songs in your app, without having to play through a Spotify device or backgrounded Spotify app. This was particularly great in the case of libspotify because it was written in C, making it easy to bind to whichever language you preferred. It was complete enough to write an entire alternative client with.
It looks like this web playback SDK works by creating a local Spotify Connect device to play to, which I guess would technically work, but it’d be much nicer if it just directly played songs as libspotify did and now MusicKit JS does.
Hmm that sounds indeed much better! Sadly not C, but cross-platform JavaScript is still nice to have.
Is it possible to embed this in native apps with an embedded browser? Hmm sounds complicated, or is there a different way to integrate this (using the apis the library uses).
Embedding just the web player in native apps would be a pain due to communication between the native and web layer. If you just did the whole thing in JS (electron, etc) you’re barely any better off than the official client in terms of resource consumption, defeating much of the point of building an alternative client.
There are reverse engineered libraries available (mainly librespot[1]) but they come with the caveat of violating the EULA and risking the accounts used with it. AFAIK Spotify hasn’t banned anybody for using it yet, but it’s always a possibility.
It looks like this web playback SDK works by creating a local Spotify Connect device to play to, which I guess would technically work, but it’d be much nicer if it just directly played songs as libspotify did and now MusicKit JS does.