Announcements

Help Wizard

Step 1

NEXT STEP

developing extensions for desktop application

developing extensions for desktop application

Hey,

I was wondering, is it possible to develop some extensions for desktop application? What I mean by extension is something that will be embedded in an existing instance of Spotify application; for example Discord allows users to create such things; many extensions have been created, for instance Discord+. I'm not sure if I missed or you provide only Web API for now? What do you think about it, are you planning to allow users to do something like this or it will rather not happen? I have a few ideas.

Reply
2 Replies

Discord might not be the best example because those types of client modifications are   and unofficial. 

ok so for for everyone wondering if that is possible, since Spotify is Chromium based it is doable, its just a matter of finding a way to injecting javascript. I randomly encountered github repo spicetify-cli which provides somewhat interface to create your own mods, it's a decent starting point to have a look.

 

However, what I specifically wanted to do is create fullscreen mode for lyrics; there is a mod that pops out the lyrics but it just creates video element on existing web page and requests it to pop, and since it's Chromium based there is no way to set size of this window to full screen. I had an idea that I could do something similar but in a new tab (window) and not to create video element in DOM but just simple div and use Element.requestFullscreen() to set that new window in fullScreen mode. I tested it in dev console in browser and it worked well, however when I tried to inject the script to the app I have encountered some security issues; first I was not able to open about:blank in new window and had to pass some real address, second requestFullscreen method must be invoked as user action or something and it fails when just invoked from javascript without user action, so I would need additional button for that just so user can click it and invoke that action. 

I would like to not create my own ui for that so I thought that I can open http://open.spotify.com/ in new window and inject that javascript here and add new button here. That seems to be working but it needs more.. shaping, since not all songs provide lyrics, the background color changes and there is another weird issue with coloring that needs to be addressed. On top of that I don't like that idea entirely because open.spotify.com requires user to log on in order to open web player, so yeah not ideal solution.

 

Idk I have some solution but not happy with it totally. Decided to post some thoughts here since it was difficult to find any information for me, maybe this can be googled more easly. Cheers.

Suggested posts