Matt
Matt

Reputation: 1

Is it possible to play an entire song using the Spotify API?

I know that it's possible to access a user's songs using the Spotify API, but is it possible to automatically play a given one also using the API (i.e. is there some method (like 'play') that automatically plays the song on the user's device given the song name that you already retrieved?). Thanks!

Upvotes: 0

Views: 533

Answers (1)

xarxer
xarxer

Reputation: 346

No, libspotify is only an API to fetch data so to speak.

What you do get from it is the callback music_delivery(sp_session *session, const sp_audioformat *format, const void *frames, int num_frames), which as you can see contains frames, which is raw audio that needs to be played by another framework for example.

I'd suggest reading Spotify's examples in order to learn how to use this.

Upvotes: 1

Related Questions