Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I let the client stream the content from Spotify in a browser based player?

Tags:

spotify

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!

like image 1000
ss1 Avatar asked Nov 22 '15 10:11

ss1


People also ask

Can you use Spotify in browser?

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.

How do you make a Spotify web player?

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.

Does Spotify API allow you to play music?

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.

Is Spotify web player better than app?

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.


1 Answers

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.

like image 62
José M. Pérez Avatar answered Nov 07 '22 18:11

José M. Pérez