Use Spotify inside vscode.Provides integration with Spotify Desktop client.
Note that some of the functionalities are only available on macOS systems (see How it works section)
This extension requires Spotify Premium to work on Windows
How it works
- On macOS, this extension uses spotify-node-applescript (basically a wrapper for the official Spotify AppleScript API) to communicate with Spotify.
- On Windows, it extension uses the Spotify Web API.
- On Linux, it uses a combination of dbus and pactl.
Go to www.spotify.com/download. If your download doesn't start within seconds, click restart the download. Look for the app in your Downloads folder and double-click it. Continue through the installation steps. There has never been an option to download your songs library on the desktop client. The option is only available on the mobile apps on Android and iOS. I'm not sure why this feature does not exist yet.
Xpotify, a popular Spotify client for Windows 10, is now an open source project.Xpotify wraps the progressive web app experience of Spotify into a Windows 10 app and adds features such as Live. Spicetify-cli is a multi-platform, simple command-line tool to manipulate Spotify desktop client as your will. It can change UI elements, inject scripts and custom apps to extend functionalities. Hope you have fun! Any question and suggestion is also welcomed, both in Product Hunt and Github!
Spotify Web API implementation can be used on any platform, but it does have some drawbacks:
- It doesn't work without internet connection (Linux and OS X implementations do).
- Full functionality is only available to Spotify Premium users.
- API calls are rate limited.
At the same time it provides tighter integration and it's more or less future proofed.
Features
- Shows the currently playing song in the vscode status bar.
- Provides commands for controlling Spotify from vscode.
- Provides hotkeys of commands.
- Provides buttons for controlling Spotify from vscode.
Compatibility table
Feature | macOS | Linux | Any Platform (only option on Windows) Web API |
---|---|---|---|
Works Offline | ✅ | ✅ | ❌ |
Show Current Song | ✅ | ✅ | ✅ |
Play Next Song | ✅ | ✅ | ✅ |
Play Previous Song | ✅ | ✅ | ✅ |
Play | ✅ | ✅ | ✅ |
Pause | ✅ | ✅ | ✅ |
Play Pause | ✅ | ✅ | ✅ |
Mute Volume | ✅ | ✅ | ✅ |
Unmute Volume | ✅ | ✅ | ✅ |
Mute Unmute Volume | ✅ | ✅ | ✅ |
Volume Up | ✅ | ✅ | ✅ |
Volume Down | ✅ | ✅ | ✅ |
Toggle Repeating | ✅ | (shows repeating state) ⭕ | ✅ |
Toggle Shuffling | ✅ | (shows shuffling state) ⭕ | ✅ |
Lyrics | ✅ | ✅ | ✅ |
Additional Web API features:
- Playlists/tracks selection. Make sure you have logged in with the command
>Spotify Sign In
to use these features. You can open the Virtual Studio Code command line with the hotkeyCtrl+P
by default.
Contributing
This project follows the all-contributors specification. Contributions of any kind are welcome, any contributions made will be recognised in the README.
A list of contributors to this project (emoji key):
shyyko.serhiy ????? | Levin Rickert ?? | Marc Riera ? | Evan Brodie ?? | Stéphane ? | Ryan Gordon ?? | Richard Stanley ? |
realbizkit ? | Jesús Roldán ? | Nicolás Gebauer ? | Muhammad Rivki ? | Miguel Rodríguez Rosales ? | Mosh Feu ? | Adam Parkin ? |
Andrew Bastin ? | Michael Fox ? | Matija Mrkaic ? | Mario ? | Fernando B ? |
Commands
There are a number of commands available for the extension, and accessible via the commandpallette. Find them by searching for 'Spotify' in the command pallette:
Adding or changing hotkeys
Better Spotify Client
All keyboard shortcuts in vscode can be customized via the
User/keybindings.json
file.To configure keyboard shortcuts the way you want, go to the menu under File > Preferences > Keyboard Shortcuts.This will open the Default Keyboard Shortcuts on the left and your
User/keybindings.json
file where you can overwrite the default bindings on the right. You may also see an interface to modify the shortcuts on different versions of vscode.Example :
For more info on hotkeys please look at https://code.visualstudio.com/docs/customization/keybindings
Buttons
Spotify Desktop Client
This extension provides a variety of buttons to control Spotify from status bar. By default 4 buttons are enabled:
- Previous track
- Play / Pause
- Next track
- Mute / Unmute
You can modify the shown buttons by changing your parameters (go here to find out how):
For the full configuration options go here.
Note that due to limitations of Spotify's Applescript API
toggleRepeatingButton
toggles only'repeat all' property of spotify. There is no way to set 'repeat one' via vscode-spotify.You can also change the position of buttons by changing the parameters below:
Seeking to a specific point in a song
You can use
Spotify Seek To
command (spotify.seekTo
) to seek to the specific point in a song. You can specify hotkey that will seek to a custom time in a song by adding keybinding in keybindings.json. For example: