Webifying Spotify on my Mac12 Apr 2020
Back in 2017, Spotify made a rather curious change to their web player app. They made some changes to stop it working in the Safari browser. The native Mac app was still there, but if you wanted to web it up, you needed another web browser. Now I used to be Chrome all the way on both Mac and PC, but since I got a new MacBook Pro last year which actually had what seems to be a reasonable battery life (compared to its nine-ten year old predecessor), I figured a switch to a power optimised native browser was worth considering. But this presented me with a bit of a challenge for a particular use case I have.
I wish I knew why Spotify made their change. If it had included withdrawal of the native app, then I could have seen it being a market-play thing. But there was obviously something going on, and I’m not convinced that Safari can’t support Spotify as I’ve seen details of people using the developer tools to switch user agents. We’ll come back to that later.
First, a little about my set-up. I’m a premium subscriber to Spotify. I have a family plan. I have an account for me, my wife has an account, my children each have accounts, and there’s a special someone who has an account who isn’t exactly human - Alexa. We have several Amazon Echo devices around our home that we use for getting the news, weather, etc. and playing music. The Echo devices are almost always set to my Echo profile, but I chose not to link up my own Spotify account to it. I work away on business quite regularly and if anyone at home wants to use Spotify on the Echo, this saves them cutting off my account to play back with as an account can only play music to one location at a time; multi-speaker set-ups aside of course.
Now, this also means that when we are playing music through the Echo devices, we can also login to the Spotify web player account using Alexa’s own account credentials, and control the playback thanks to the Spotify Connect feature. This makes it really easy to do from my work PC in my home office.
But, when I’m using my Mac, I have the Spotify app, and I stay signed into that with my personal account. I’d like to be able to use the web player just like I can on Chrome on Windows on my work laptop, but I don’t want to have to install Chrome on my Macbook Pro just to do this. It seems overkill and will likely have a bit of a negative impact on battery life if I’m roaming around the house.
Now, I could do the whole dance of logging in and out of the native app with frustrating regularity, or playing around with user agents in the Safari developer settings each time. But quite frankly, that way madness lies. Instead I took a different approach.
On my work laptop, I’ve created several Chrome app shortcuts that launch separate Chrome instance of web apps. Including the Spotify web player. I decided to try something similar on the Mac using a utility called Unite.
I managed to pick up Unite 3 on a deal on MacHeist, and it enables me to create local apps that encapsulate web pages/apps. It’s based on Webkit 2, and Webkit is the browser engine that Safari utilises. Now that might sound like it wouldn’t get me anywhere, until you realise from earlier that if you reconfigure the service agent you can make the Spotify web player work. And that’s exactly what I did.
To create the app open Unite and fill in a name for the app, and also the URL of the player (
https://play.spotify.com). You can then grab the icon from the web like I did here, or download a higher quality one (it’ll look better on a retina display if you do) and grab it from your Mac.
Select Create Unite Application and this will run through the generation process and display a window like this when it completes.
Select Launch application. At this point you’ll see that we a messages about the browser not being compatible.
In the app’s menus, select
Spotify Web player > User Agent > Chrome-Mac. Nothing changes at this point because we need to reload the web player. With the app in focus, press CMD+R to reload the page, and we now get the Spotify web player login page.
Select the login option as normal, enter your credentials, and you’re all set.
Is it Worth it?
I will point out at that I didn’t just get a copy of Unite to tackle this issue. I also wanted a better way of running Slack rather than using the famously power hungry native app. Wrapping the Slack web page into a Unite app was another thing I wanted to tackle, and I’m sure I’ll have more in future, just like I do on my work laptop.
I found a good deal on the app and good deals come up on it fairly frequently. As a result, I was very happy to spend the cost of a couple of coffees to give me the flexibility I was craving. Over time I’m positive that the cost will easily be recouped when matched against the time I would have spent logging in and out, and the battery saving aspect for me was a deal maker for not installing another browser just for Spotify Web player use. There’s also the cognitive benefit of not having to deal with the frustration of having to deal with this.
While it would have been nicer not to have to jump through these hoops, I feel this is a good middle ground.
There is also a free app, with paid for pro features, called Fluid that’s been around for a long time that works in a similar way. I’ve used it in the past, but Unite looked like it gave me the easiest access to the sorts of settings I needed. If you want to try doing this without shelling out for Unite, I’d suggest taking a look at that app instead.