11 ms·
How is Javascript used within the Spotify desktop application?
- ly 11y agoI got a HDPI display for my windows machine a few days ago. What I am wondering now is why Spotify doesn't support this? If it runs on chromium, which does support hdpi displays, why doesn't spotify? I have I have to choose for a really small spotify client or a real blurry one. Reading this, it would not seem to hard to make it work. It works fine on OSX.
- jonnynezbo 11y agoFirst off, great Quora answer. I wonder: if the 'notifications' squad comes up with an idea like 'users should be able to disable notifications', do they have to collaborate with the 'settings' squad?
- janpieterz 11y agoThere are two [1] [2] super interesting videos about how Spotify works. Well worth the watch! [1] https://vimeo.com/85490944 https://vimeo.com/85490944 [2] https://vimeo.com/94950270 https://vimeo.com/94950270
- josteink 11y agoI'm not going to applaud Spotify for the direction their desktop-client has taken UX-wise, but I did find this an interesting read about how they organize both their code and teams. I always assumed parts of the Spotify-client had to be HTML/JS based, but I had no idea it was done to such an extensive degree.
- LMAlVvQjSGj 11y agoThe Spotify desktop client has seen a massive regression since 2008 or 2009. It's incredible how they managed to make it so unresponsive. Scrolling in a playlist is like playing a game at 10 fps. It's uncomfortable and not worth it. Ads are worse as well. I've seen countless malware ads in the bottom banner.
- devicenull 11y agoYou also can't ctrl-f within a page, which makes finding things really annoying.
- cwyers 11y agoYou USED to be able to. It's very annoying that that feature is gone.
- nindalf 11y agoI can't say I've experienced any of the complaints about slowness that the other people have mentioned but this regression has really annoyed me. You could search for a song within a playlist and now you can't. I have no idea why they would remove it.
- ploxiln 11y ago... but (smart?) developer time is so expensive! and computers are so fast!
- drdaeman 11y agoI get it's sarcasm, but the problem is that computers are not so fast yet. Developer vs computer time trade-off works only when software already works reasonably well. Which is not the case.
- seanp2k2 11y agoBack in Windows 98 days, it took a few seconds to load a screen of a native app sometimes. Now our computers are orders of magnitude faster, and webapps can still take a few seconds to load a screen. Progress?
- odiroot 11y agoI have a feeling that's not the case for the Linux version. It looks completely different than other platforms and is also build against Qt libraries.
- strangecasts 11y agoYeah, the 32-bit Linux version (the 64-bit version has the new UI IIRC) is the way the Spotify client used to look before they switched over to WebKit. I wish it was possible to go back to that on Windows - it was much snappier and didn't have lots of pointless padding between song titles.
- Dewie3 11y agoHuh, I thought the Linux client was some kind of web-stuff too. It certainly feels that way.
- thrownaway122 11y agoFrom the two computers I've used with spotify clients on the Linux version is far snappier and more responsive (as in responds to commands sometime within the current minute) than the OSx version. According to their blogs etc the main purpose of the Linux version is internal use by spotify developers working on Linux workstations - it is only released to the public because, "why not?". I wonder if this is why the Linux version is 'behind' the windows/OSx versions but actually works better. I.e. they dogfood it more but don't feel the need for constant UI 'improvements'.
- matthewmacleod 11y agoIt's been like this for some time – I remember I was able to inspect elements within the page some time ago. One of the problems though – the user experience of the app is rather unpleasant. It's extremely laggy and noticeably non-native – using incorrect keyboard shortcuts, and so on. I'm sure it's possible to do it better, but the UX of the app used to be great and is slowly declining, which is a real shame.
- GeorgeHahn 11y agoWhile I'm appalled by some of the recent changes Spotify has made, I'm really impressed by how easy it is to work on their desktop client. I can't even imagine how nice things must be when you have the real source, automatic live-reload, and don't have to muck around with concatenated or minified JS/css/handlebars files. This setup can't be good for memory usage, but it rocks for development! For anyone who's curious, it's easy to take a look under the hood from the Spotify installation folder. (Windows users can find it at %APPDATA%/Spotify/) The Apps directory is full of *.spa files. These are zip files; if you extract them to folders with the same names and delete the zips, the application will still work, but you'll be able to edit the code. The zlink directory is the most useful. This holds the main UI and much of the logic that powers it. Search through main.js in this directory for the Session.prototype.isDeveloper declaration. If you force it to return true, the Spotify UI will refresh when you press F5 inside it. Now you don't have to close and reopen every time you make a change! This will also add some miscellaneous UI embellishments (they aren't terribly useful and can be disabled by hardwiring logic elsewhere in main.js). Initially, I thought the about directory would be a handy sandbox to mess around in, but then I realized that you can easily add new apps! Integrating them into the UI takes a bit of effort, but you can easily get to them by putting the app URI into the search bar (spotify:app:___). (Each app's URI is defined within the its js file. Make sure you give it a unique name in its manifest, too.) Additionally, you can open cef.pak and devtools_resources.pak with a text editor and mess around (though they're not terribly useful). NB: If you're really motivated, it shouldn't be too hard to set up a complete development environment for this. I was able to quickly dump most of the concatenated files to zips - all I needed to do to finish was to cut off some of the module wrapper code and reformat directory paths. I quit when I accomplished my goals of shuffling the UI around, but if you're interested, I have a simple concatenated files dumper at https://gist.github.com/GeorgeHahn/0deef2fb0d392ef507dd https://gist.github.com/GeorgeHahn/0deef2fb0d392ef507dd. It takes a bit of mucking around, but it's not too hard to achieve a legacy-UI feel (volume on the left, no lyrics button, de-uglified media control buttons, compact playlist/track lists, etc). Of course, this will get ruined the next time Spotify updates, so you should block updates and make backups if you want to keep your changes.
- touristtam 11y agoMaybe that could offer the basis for an alternative client. Thanks for sharing your knowledge. :)
- hello_moto 11y agoSAP Lumira (http://saplumira.com/ http://saplumira.com/) also uses JavaScript/HTML5 with similar approach to Spotify for the desktop application.
- DigitalSea 11y agoI really like the approach that Spotify take to working on new features, the squads idea is quite good. I think it is important that people occasionally break out of their cliques and work with new people, I have found based on personal experience that working with the same people day-in-day-out will eventually give you tunnel vision. You stop learning from those around you, eventually the hive-mind becomes one and there is little free-thinking. Breaking out and working with another squad I think could be beneficial to Spotify. This is where the praise ends. As a Spotify Premium user, I love the service, but the interface as many others have pointed out has really gone downhill. I don't know who is leading the UX squad over at Spotify, but the app needs considerable work. High startup times, incredible amounts of frame rate lag and removal of the system tray icon. What is going on over there? I have also noticed that the app can play a song quickly, but browsing and searching is incredibly slow (even on a fast connection).
- mahouse 11y agoIf you feel like the Spotify desktop application is slow, you can try and use play.spotify.com instead—it's almost the same, and you can even use AdBlock on it.
- finicky 11y agoi'm so confused as to why Spotify removed the ability to search within a playlist recently. such a useful feature is now gone, really leaves a sour taste in my mouth.
- est 11y agoIs Ludvig Strigeus @ludde (of µTorrent/OpenTTD/ScummVM fame) still developing Spotify desktop client? I hope this chromium crap isn't his decision.
- johanbrook 11y agoHe's still there, and is doing low level stuff and hacks in Gothenburg. I heard he wrote much of the initial, highly optimized code for Spotify Connect. I don't think the move from the C/C++ client was something he liked, tbh :)
- amd_ 11y agoInteresting that I can't listen to Spotify while running certain debuggers - not that its hard to by pass this "feature".
- not_kurt_godel 11y ago> I would bet that the Spotify desktop client is among the top 25 most intricate uses of JavaScript in the world. If this is really true, "intricate" probably means "needlessly complex" because the interface, while by no means bad, is nowhere near as sophisticated as many JS apps I have seen and worked on. Off the top of my head, I would be willing to bet GMail, Google Spreadsheets, and Facebook are all vastly more "intricate" than the Spotify client based purely on number of features.
- miken123 11y agoNice technical read, but to be honest, the moment I find another app that does what I need I will gladly leave Spotify behind. Apart from the general slugginess of the app, the number of features that have been removed over the last couple of months is staggering. Just some examples, in case someone from Spotify in a position to fix this is reading this: * Searching in playlists was removed * Searching in local files was removed (and the local file support has always been crap anyway, please work together with Last.fm to properly match files) * Creating a new playlist in a folder was removed (you now have to create and move the playlist) * Sorting playlist folders was removed. * The option to turn off your 'volume normalisation' was removed. Because your algorithm is really broken and severely compresses the music, removing any dynamic range, this is the biggest showstopper for me. Check your forums, tens if not hundreds of people already left because of this. * Apps were removed (tbh, I can live with this) Oh, another one, please give us an option to turn off 'Spotify Connect'. It prevents my Android phone from entering deep sleep, and thus it is a battery drain. You don't need to fix the battery drainage, just give me an option to turn the feature off.
- danielsamuels 11y agoStarring songs was also removed and individual songs you "Save to Your Music" get bundled in with every song from every album and artist you've saved or followed and the songs from some playlists it seems. It's a complete mess.
- praseodym 11y agoTo be fair, I still have my 'Starred' playlist and I can still add items to it. But granted, it's a bit more cumbersome to add new songs to it. For me "Your Music" only contains songs I explicitly add to it, so not songs from playlists or artist that I follow.
- kaka12 11y agoI believe that the main reason for not being able to disable 'Spotify Connect' is that the functionality is being used to prevent people from sharing Spotify accounts. This became particularly clear in the last version of Spotify when they made it impossible to set the Spotify client in 'Offline' mode if the phone was already connected using 'Spotify Connect' (the 'Offline' setting is being grey out). Now you have to set the phone in 'Flight mode' and then start up the Spotify client and set the Spotify client to 'Offline' mode (and then disable 'Flight mode' if you want to use Internet while listening in 'Offline' mode). So my guess is that they will never make it possible to disable 'Spotify connect'.
- thecopy 11y agoI am using Spotify 0.9.17 on Linux, and it is blazing fast. Starts up and is ready in under 0.5 seconds. Compared to the new "improved" JS version on my OS X it is an order of magnitude better. I can still search in playlists! And i get the Top Lists for all the contries instead of just a few (Spotify decimated the avaiable contries in top lists in the JS version). Stay on the native app as long as you can.
- clemsen 11y agoAnybody who spent some time on https://community.spotify.com https://community.spotify.com will agree that Spotify does not give a damn about the opinions of their most passionate users (the ones that actually want to improve the experience by participating in the forum!). Especially since Spotify significantly increased font size and line spacing for no obvious reason [1] and no option to change it back even when this was a (from my perspective) widley demanded feature, I have lost confidence in the community process. [1] https://community.spotify.com/t5/ideas/v2/ideapage/blog-id/ideas_live/article-id/10934/page/10#comments https://community.spotify.com/t5/ideas/v2/ideapage/blog-id/i...
- staticelf 11y agoCan we please stop linking to Quora articles? Just post it on pastebin or something similar. It's silly to post to a place where you need to signup in order to read the material.