Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

node-libspotify

> 编程语言
Open source

Node bindings for the libspotify C library

100 stars0 likes1 views
WebsiteGitHub

About

Node bindings for the libspotify C library

node-libspotify

Node bindings for the libspotify C library

This is still very alpha, but you can already play around I suppose

Install & test

Please note that you must have the libspotify library installed on your system you can get it from here.

You must provide your own spotify application key, because I'm not giving mine away :] You also must provide valid credentials for a spotify account.

Once you cloned the repository run npm install then test the module with npm test.

Main objectives

As there are already a number of spotify bindings or modules for the REST API, the main goal of this module is not to give access to the artist and tracks catalog. It's main purpose is to allow for playback of the tracks. The idea is to expose a Player object in which the user can load tracks, play them, and get decompressed audio data from it (as provided by the libspotify C library).

What the user can do with the audio stream is up to him/her. As it is raw PCM data, it is easy to pipe to some kind of encoder (like gstreamer) in order to broadcast music or stream it to a web user (as long as it complies with the Spotify terms of service ;).

The user can also choose to play the song locally with a node module like speaker or pipe the audio data to another process like aplay.

The main goal is now achieved. Audio data is exposed as the Player object which behaves like a readable stream.

Snippet

Here is a code snippet of how to play a track from spotify

…

TODO

  • Bind to the rest of the API...

Credits

Thanks to IainCole for his help on the playlist subsystem. Thanks to LinusU and swissmanu for their help on album cover retreivals

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言