Use Spotify inside vscode.Provides integration with Spotify Desktop client.
I see that you can copy embed code in Desktop App, it's good to add Spotify play button to your blog, the music chat. But you can't do this in a mobile platform, it's not difficult, and it'll make mobile app. Right-click any song, album, artist, playlist or podcast in the Spotify app and select “Share.” Click on “Copy Link” or “Copy Spotify URI” to copy the Spotify Link or URI. (Or use a shortcut and embed the code directly from the desktop app’s “Copy Embed Code.”). Spotify Codes offer a brand new way for users to share and discover anything available on Spotify. It’s as easy as taking a picture. Get responsive embed codes for Spotify. Manually or via simple API.
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.
Spotify Web API implementation can be used on any platform, but it does have some drawbacks:
How To Embed A Spotify Playlist
- 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):
Spotify Embed Player
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:
Embed Code Spotify App Download
Adding or changing hotkeys
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
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.![Code Code](/uploads/1/3/3/8/133879540/111454029.png)
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:![App App](/uploads/1/3/3/8/133879540/610082174.png)
Add Audio Embeds from Spotify To Your Site
Spotify is a new way to listen to music. Spotify Millions of tracks, any time you like. Just search for it in Spotify, then play it. Just help yourself to whatever you want, whenever you want it.
With Embedly, you also get embeds from these 700+ providers.
URL Schemes
Supported URL schemes for Spotify audio embeds. Spotify offers free premium.
- http://open.spotify.com/*
- https://open.spotify.com/*
- http://spoti.fi/*
- http://play.spotify.com/*
- https://play.spotify.com/*
What is Embedly?
Embedly offers a suite of tools, APIs, and libraries to help you embed content from media providers into your own websites and apps. Richer content means a more engaging experience for people who visit your website or use your app.
If you're looking for a quick way to develop with embeds check out our libraries or tutorials available for jQuery, Python, PHP, IOS and more.
We also provide a Wordpress plugin to embed any supported media provider. https://treefabric649.weebly.com/blog/spotify-ripper-apk.