Couldn't find anything on Google about that topic, so I'm asking here. I had an idea for a web based Spotify player (not like the offical one) and I would like to know if it's possible to let the client (user) stream the content from Spotify instead of my server (app). Would be pretty expensive if my server would have to stream the data and to send it to the client :-/
Thanks!
Spotify is one of our favorite music streaming services and one thing you might not know is that to use it, you don't need to download an app: you can use it straight from your web browser. Spotify's Web Player works in Google Chrome, Firefox, Edge, and Opera. The only notable absence is Safari.
To use the Web API, start by creating a Spotify user account (Premium or Free). To do that, simply sign up at www.spotify.com. When you have a user account, go to the Dashboard page at the Spotify Developer website and, if necessary, log in. Accept the latest Developer Terms of Service to complete your account set up.
At its core, the Player API empowers your web application to tell Spotify what audio to play and where and how to play it. In order to make commands, your app will need an OAuth access token authorized with the user-modify-playback-state OAuth scope.
The Spotify desktop app boasts considerably higher sound quality than the web version. Free users get up to 160kbps bitrate on the app, while the premium version offers an extremely high 320kbps. On the other hand, free users on the web app get only 128kbps, and paid users get up to 256kbps bitrate.
Unfortunately, there is no web library that you can use for streaming content from Spotify. The closest is the Spotify Play Button but that is a widget that remote controls Spotify from the desktop client or Spotify's web player.
You are limited to use the 30 seconds previews, or use the Android or iOS SDK if you were to build a mobile version of your site. The SDKs allow full playback for Spotify premium users.
There is a feature request for fetching full tracks on Spotify's Web API GitHub repo that you can watch or add comments to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With