PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Play Spotify on Raspbian Chrome [Easy Directions!]

Tue Mar 07, 2017 2:49 am

So you can easily play Spotify Web Player on Raspberry Pi with Default Raspbian using Chromium Browser!

[This will not work on Pi Zero it too low CPU and ram]

Here are the directions:
Go to settings in Chromium
Show Advanced Settings -> Content Settings -> Flash -> Manage Exceptions
Add:
https://play.spotify.com
https://open.spotify.com

Then you will want to add a "User Agent Switcher for Chrome" offered by Google as a extension:
https://chrome.google.com/webstore/deta ... g?hl=en-US

Once installed select the User Agent Switcher for Chrome Icon and change it to Firefox Windows or IE 10 Windows.

Then go to https://play.spotify.com login and you will be able to play Spotify Web Player! Have fun.

PS You don't need premium for this to work!
Also here was my source:
https://www.reddit.com/r/raspberry_pi/c ... y_pi_user/
Last edited by PuppetHoundZ on Fri May 12, 2017 8:50 pm, edited 3 times in total.

kriegerkl
Posts: 3
Joined: Wed Mar 08, 2017 9:19 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Mar 08, 2017 9:34 am

I tried this.
The only problem is, that I can not use the player controls.
For example the volume slider is 0 at the beginning.
So ausio is off and I can not hear anything.
If I change the slider with the mouse after one second the slider returns to the initial position.
The other controls do not react either. For example if I press the play-icon, the icon is highlighted but nothing happens.
What can be the problem?

I can connect the spotify web player from my smartphone spotify app, but because of the problem (s. above) I can not hear anything.
Last edited by kriegerkl on Wed Mar 08, 2017 3:52 pm, edited 1 time in total.

mikerr
Posts: 2826
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Mar 08, 2017 10:22 am

Well that's fantastic news, and opens up use of pi's as a standalone spotify player - with less messing than other methods.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Mar 08, 2017 8:22 pm

mikerr wrote:Well that's fantastic news, and opens up use of pi's as a standalone spotify player - with less messing than other methods.
It sure is and the player works really well. Spread the word. Also if you need to make the player load faster, turn off images in chrome by going to:
Settings -> Show Advanced Settings -> Content Settings -> Images -> Do not show any images.

PS you may need to show images briefly to log in using the special log in "captcha" as it uses images to make sure your not a robot. Plus blocking images will block dirty images from album art which can come in handy around kids, family and those who seek a more modest approach to music listening.

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Mar 08, 2017 8:26 pm

kriegerkl wrote:I tried this.
The only problem is, that I can not use the player controls.
For example the volume slider is 0 at the beginning.
So ausio is off and I can not hear anything.
If I change the slider with the mouse after one second the slider returns to the initial position.
The other controls do not react either. For example if I press the play-icon, the icon is highlighted but nothing happens.
What can be the problem?

I can connect the spotify web player from my smartphone spotify app, but because of the problem (s. above) I can not hear anything.
Could be something with your Audio settings on the Pi also make sure you using the latest version of Raspbian Pixel the default install made this easy.

Or you may need to set your audio settings to support pulse audio in audio settings.

Overall I didn't really need to modify any settings other then chrome that came with Raspbian


PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Mar 08, 2017 11:27 pm

mattmiller wrote:Great find :)
Thanks. I hunted hard for this because I knew if Pandora would work with Chrome on RaspberryPi, then Spotify has to work too.

Apparently Spotify block raspberry Pi user agents so I spoofed and bam! Works!

kriegerkl
Posts: 3
Joined: Wed Mar 08, 2017 9:19 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Thu Mar 09, 2017 11:14 am

PuppetHoundZ wrote:
kriegerkl wrote:I tried this.
The only problem is, that I can not use the player controls.
For example the volume slider is 0 at the beginning.
So ausio is off and I can not hear anything.
If I change the slider with the mouse after one second the slider returns to the initial position.
The other controls do not react either. For example if I press the play-icon, the icon is highlighted but nothing happens.
What can be the problem?

I can connect the spotify web player from my smartphone spotify app, but because of the problem (s. above) I can not hear anything.
Could be something with your Audio settings on the Pi also make sure you using the latest version of Raspbian Pixel the default install made this easy.

Or you may need to set your audio settings to support pulse audio in audio settings.

Overall I didn't really need to modify any settings other then chrome that came with Raspbian
Thank you for your considerations.
At first I thought too, that it has somethin to do with my audio settings, because I have only the hifiberrydac device.
But then I found this. This is the same problem, which I also have:
https://github.com/tomasmcm/SpotiWeb/issues/20
https://community.spotify.com/t5/Deskto ... -p/1589434

Do you have any suggestions?

When I try to change the user-agent into safari, I get the old spotify-web-player, but then I will be ask to install the Adobe flash-player.
When do you connect with chromium to spotify, do you hav the old or new web-player?

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Thu Mar 09, 2017 3:26 pm

I get the old player.

User agent needs to be internet explorer 10 if your getting the new player with safari user agent.

I mention in the first post you may want to use Firefox window user agent.

Spotify is using user agent identification to determine if you should get new or old player.

kriegerkl
Posts: 3
Joined: Wed Mar 08, 2017 9:19 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Thu Mar 09, 2017 4:28 pm

Thank you, that was the Problem.
Now it works.
Unfortunately the old player don't support spotify connect, so that I can't control spotify from my smartphone.

Do you think that there will be also the possibility to run the new web-player?

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Tue Mar 14, 2017 3:05 am

kriegerkl wrote:Thank you, that was the Problem.
...
Do you think that there will be also the possibility to run the new web-player?
Your welcome. Unfortunately whether it will support new web-player in the future is not something I can answer. It's really determined if the current versions out there in the wild will get update for Raspberry Pi. Because the current chrome on Windows 10 supports the new player. But I've understood that the New Spotify Web player still a rolling release with Spotify because it only works on certain browsers properly.

sarih
Posts: 4
Joined: Mon Apr 24, 2017 11:04 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Mon Apr 24, 2017 11:15 am

Hello,

Yesterday im tried to run Spotify Web Player on my rpi0. I used new fresh system with apt-get dist-upgrade. I used User Agent Switch, without i was redireced to main page of spotify.

Unfortunately, play.spotify.com shows popup about install flash, with link to adobe page.
Is it still possible to run spotify web player on actiual raspbian system?

On rpi3 is still working it? Any chance to run it on rpi0?

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Mon Apr 24, 2017 3:54 pm

So you can easily play Spotify Web Player on Raspberry Pi with Default Raspbian using Chromium Browser!

Here are the directions:
Go to settings in Chromium
Show Advanced Settings -> Content Settings -> Flash -> Manage Exceptions
Add:
https://play.spotify.com
Please make sure you follow the directions above. There is a step in there to activate flash on a white list within settings in chromium. Also, raspberry Pi zero may have little of ram to run the web player properly, due to limited ram and processor power. I recommend raspberry pi 2B or a raspberry pi 3B

sarih
Posts: 4
Joined: Mon Apr 24, 2017 11:04 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Mon Apr 24, 2017 7:12 pm

PuppetHoundZ wrote:
So you can easily play Spotify Web Player on Raspberry Pi with Default Raspbian using Chromium Browser!

Here are the directions:
Go to settings in Chromium
Show Advanced Settings -> Content Settings -> Flash -> Manage Exceptions
Add:
https://play.spotify.com
Please make sure you follow the directions above. There is a step in there to activate flash on a white list within settings in chromium. Also, raspberry Pi zero may have little of ram to run the web player properly, due to limited ram and processor power. I recommend raspberry pi 2B or a raspberry pi 3B
Thanks for your replay. I have added https://play.spotify.com:443 to whitelist. I make your steps again, and unfortunately have this same problem. Here are screens:

Image

Image

Any ideas?

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Mon Apr 24, 2017 7:53 pm

Yes click on "Get Flash" and it will load the page will load.
Also add http://play.spotify.com to your white list the one without the "s".


If that doesn't work, make sure your on https://play.spotify.com and click on the green padlock symbol next to the green "secure" text in the URL address omnibox. This should pull up settings for the website your on make sure flash is enabled in that drop down menu.

Also make sure your not blocking cookies and it's set to allow all which is the default setting of chrome. Blocking cookies on Spotify causes problems with the page loading as well even when you use Windows or mac.

sarih
Posts: 4
Joined: Mon Apr 24, 2017 11:04 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Apr 26, 2017 6:57 am

I tried everything you write here. Nothing helps...

Here are steps i do:

1) dd fresh last raspbian image (2017-04-10)
2) sudo apt-get update && dist-upgrade (rpi-chromium-mods update)
3) Install "Agent User Switch" and set to IE10
4) Add http and https play.spotify.com to flash white-list
5) Go to play.spotify.com -> still have window about flash.

When i click "Get Flash" new tab open get.adobe.com page to download flash.

http://oi64.tinypic.com/fjnjhs.jpg

It's look like flash in chromium have wrong version, and spofity want to download new one.

I will dd new system and check all without my 2) step.

**** EDIT ****

Its very strange... when i use open.spotify.com, or any playlists like https://open.spotify.com/user/spotify/p ... GjsySWIS1x its work, without any workaround (no user-agent-switcher or flash allow..) just fresh raspbian system....

Thanks for help.

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Apr 26, 2017 2:37 pm

sarih wrote:
**** EDIT ****

Its very strange... when i use open.spotify.com, or any playlists like https://open.spotify.com/user/spotify/p ... GjsySWIS1x its work, without any workaround (no user-agent-switcher or flash allow..) just fresh raspbian system....

Thanks for help.
Weird. Well Spotify is trying to implement a new web player so that could be causing some issues. Also Spotify really are using some weird anti user agent tactics. Maybe try the different user agent settings to see if anything changes.

Also maybe try modifying unlock origin settings and add malware blocking. Just to see if it helps.

Update I also use privacy badger another chromium extension. I use these to help block browser sites for safety. Then there is https everywhere too. These extension could be helping me load the site.

Also world location could play a factor in the features Spotify has as well and also your account maybe put in a beta for the open.spotify.com


So we're you able to get player to work based on your update?

Pearl.852
Posts: 60
Joined: Wed Jun 08, 2016 1:22 pm
Location: Hong Kong

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Apr 26, 2017 5:54 pm

PuppetHoundZ wrote:So you can easily play Spotify Web Player on Raspberry Pi with Default Raspbian using Chromium Browser!
Great job! I have been trying to play spotify on my rpi3 and your instructions works perfectly for me. ;)

sarih
Posts: 4
Joined: Mon Apr 24, 2017 11:04 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Thu Apr 27, 2017 7:14 pm

I think that my problem is in rpi0 and its old arm CPU. As I see, on rpi3(and probably rpi2) its work ok. I leave my project of make free listener of spotify on my rpi0 via browser...

I bought spotify premium, and install on my media center rpi2 running over osmc, a mopidy. I made some settings to seperate audio: mopidy ( for music over USB audio) and osmc with kodi (over HDMI). All works awesome.

If anyone wants make something similar, here are topic (on osmc forum) which i used: https://discourse.osmc.tv/t/mopidy-on-osmc-alpha-4/456 (last 4 posts)

Thanks, PuppetHoundZ for trying to help me, but i think that it cant be done on rpi0 (and probably on rpi1).

If someone run spotify web player on rpi0/1 please let know here, when i will try again to make it.

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Thu Apr 27, 2017 7:25 pm

sarih wrote:I think that my problem is in rpi0 and its old arm CPU. As I see, on rpi3(and probably rpi2) its work ok. I leave my project of make free listener of spotify on my rpi0 via browser...
No problem. I believe I mentioned that Raspberry Pi Zero has too little Ram and processing power to handle Spotify using Flash player.

I update my post to confirm that your can do it for sure now with PiZero.

DT22
Posts: 1
Joined: Fri Mar 16, 2018 2:24 pm

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Fri Mar 16, 2018 2:32 pm

Hi

I appreciate that this is an old thread but I've just bought my first Pi.

I've followed the instructions of the OP, using IE10 as the agent.

I'm taken to a web page entitled "Browse" and Spotify reports that "The browser doesn't support web player". I can however play their sample playlists on the page so the audio is ok.

Has anything happened in the last 12 months ie has Spotify done anything to stop us following the OP's instructions?

Thanks.

RafaPolit
Posts: 4
Joined: Wed Apr 04, 2018 4:35 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Apr 11, 2018 6:25 pm

Same happening to me. Any insight would be great! Thanks.

mob-i-l
Posts: 317
Joined: Sat Dec 29, 2012 2:45 am
Location: Lund, Skåne/Scania, Sweden
Contact: Website Facebook Twitter YouTube

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Sun Aug 25, 2019 9:04 pm

It also doesn't work here in Raspbian Buster on Raspberry Pi 4 B (4GB RAM, 256 GPU memory), and I followed the instructions. How to add allowed flash sites have changed and I could not add https://play.spotify.com since i jumps to https://open.spotify.com/, but I have added
https://helpx.adobe.com:443
https://open.spotify.com:443

On https://helpx.adobe.com/flash-player.html i have Flash Version 32.0.0.238.
Have Pi0&1A&1B&1B+&2B&3B&4B w/ Raspbian. Started w/ BASIC on ABC80&ZX81 then Forth, Z80… https://scratch.mit.edu/users/mobluse/ https://github.com/mobluse/ https://twitter.com/mobluse/ https://YouTube.com/MOBiL4u/

neonsidewalk
Posts: 11
Joined: Tue Jun 14, 2016 11:11 am

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Tue Aug 27, 2019 9:08 pm

I'm having the same trouble. The 'easy directions' don't work with the current version of Raspbian.

Does anyone have clear directions how to load and run spotify on the RPI (4)? Using Chrome or any other browser?

Thanks

fruitoftheloom
Posts: 24092
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Play Spotify on Raspbian Chrome [Easy Directions!]

Wed Aug 28, 2019 5:00 am

neonsidewalk wrote:
Tue Aug 27, 2019 9:08 pm
I'm having the same trouble. The 'easy directions' don't work with the current version of Raspbian.

Does anyone have clear directions how to load and run spotify on the RPI (4)? Using Chrome or any other browser?

Thanks

https://help.vivaldi.com/article/raspberry-pi/
Thinking outside the box is better than burying your head in the sand...

Return to “Raspberry Pi OS”