Now Playing Lyrics Player for VS Code
See and control what is playing on your computer without leaving the editor: Spotify, your browser (YouTube, SoundCloud…), Apple Music, VLC and more. Works on Windows, macOS and Linux.
- Status bar:
▶ Song — Artist, or the current lyric line. Hover for the cover, album and the lyric.
- Player view (activity bar) and player panel (Command Palette → Now Playing: Open Player in the Editor): blurred cover background tinted with the cover's colours, a glowing cover, synced lyrics that scroll with the song (click a line to jump there), a seekable progress bar and previous / play / next buttons. It reshapes itself for a narrow side bar or a wide editor tab.
- Lyrics that understand your music, Latin and Arabic: YouTube-style titles (
Artist - Song (Official Video), Song - Artist | عنوان بالعربي - الفنان, ArtistVEVO, Artist - Topic channels) are read in every language version and both orders; Arabic spellings are compared as the same word (أ إ آ ا, ة ه, diacritics); results are scored by title, artist and length. Sources: LRCLIB, then NetEase Cloud Music when LRCLIB has nothing synced. Songs with only plain-text lyrics show them as a scrollable text.
- Covers even when the app gives none (browsers don't): Deezer, then Apple Music (several storefronts), then NetEase, then the artist's own picture, matched by artist and title. If nothing is found, a coloured placeholder with the song's initials is shown.
- A three-dot menu in the player: search the lyrics and cover again, lyrics earlier / later / reset, copy the current lyric line or the song and artist, hide or show the lyrics, status bar mode, settings.
- Commands: Play / Pause, Next, Previous, Copy the Current Lyric Line, Change What the Status Bar Shows, Show the Lyrics Earlier / Later (this song) (for videos with an intro; remembered per song), Search the Lyrics and Cover Again, Reset the Lyrics Timing, Copy Song and Artist.
How it works
| OS |
Reads what is playing from |
You need |
| Windows 10/11 |
the System Media Transport Controls (the volume flyout): Spotify, browsers, Apple Music, VLC… |
nothing |
| Linux |
MPRIS (the standard Linux media interface): Spotify, Firefox, Chromium/Brave/Chrome, VLC, mpv… through the playerctl command, or through gdbus (part of glib, almost always installed) when playerctl is missing |
nothing, or playerctl (sudo apt install playerctl). In Brave/Chrome/Chromium turn on brave://flags > Hardware Media Key Handling if the browser does not show up |
| macOS |
Spotify and Apple Music through AppleScript (macOS asks once for the Automation permission). Browsers and other apps through nowplaying-cli if you install it (brew install nowplaying-cli); it may not work on the newest macOS versions |
nothing for Spotify / Music |
No Spotify login is needed on any system. Lyrics and covers are looked up online; only titles, artists, albums and lengths are sent (never your account, files or editor content). Turn the lookups off in the settings.
Settings
| Setting |
Default |
|
nowPlaying.statusBar.mode |
both |
both, title, lyric or off |
nowPlaying.statusBar.alignment |
right |
left or right (reload the window after changing) |
nowPlaying.fetchLyrics |
true |
look up lyrics (LRCLIB) |
nowPlaying.lyricsFallback |
true |
also try NetEase when LRCLIB has no synced lyrics (helps a lot for Arabic) |
nowPlaying.lyricsDelayMs |
0 |
show every lyric line this much later (negative: earlier) |
nowPlaying.fetchCovers |
true |
look a cover up when the app gives none |
nowPlaying.pollIntervalMs |
700 |
how often the system's media state is read |
Install from a file
code --install-extension nowplaying-pc-0.2.2.vsix
Build the file yourself with npm run package (uses vsce).
Limits
- "Nothing is playing" although something is? Run Now Playing: Show Diagnostics (Command Palette) or click Show diagnostics on the empty player: it lists what the reader sees and says why. On Linux, VS Code installed as a Snap or Flatpak, or used over SSH/WSL, cannot see your desktop's media players.
- Only one media session is shown (a playing one wins) when several apps play at once.
- Seeking (progress bar, clicking a lyric) works only if the playing app supports it; Spotify does, some browsers don't.
- Lyrics are matched by title, artist and length; a song with an unusual title may have none. Music videos often start with an intro: use Show the Lyrics Earlier / Later to line them up.
- Some apps give no cover or no length (the bar stays empty).
- Linux and macOS support is new and was tested with simulated system commands only (the author develops on Windows). If something is off on your system, please open an issue with your distribution or macOS version.
Develop
A smoke test that runs inside a real VS Code lives in scripts/vscode-smoke (run VS Code with --extensionDevelopmentPath=. --extensionTestsPath=scripts/vscode-smoke; it writes what the extension read to NP_SMOKE_OUT).
npm test # lyric parsing and matching, the Linux and macOS readers (fake commands), the extension against a fake VS Code
Press F5 in VS Code to run it in an Extension Development Host.
MIT licence.
| |