npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-spotify

v0.8.1

Published

A wrapper for libspotify

Downloads

34

Readme

node-spotify

Build Status node-spotify wraps the C library libspotify for usage with NodeJS.

A webpage for the project is here: http://www.node-spotify.com.

I'm working toward version 1.0.0 which is not meant to provide everything libspotify offers. But I intend to wrap all libspotify types and provide methods to access them where possible. Options and convenience features my lack, though.

Dependencies

  • libspotify must be installed
    • Linux users get it from here
    • OSX users can use homebrew (brew install libspotify) or download it from here
  • an appkey for libspotify, get it here. Choose binary, not C code.
  • users of libspotify must have a Spotify premium account, this is required by Spotify.
  • (Linux only) If you want audio the ALSA audio system, should be installed in most distributions [1]

[1] See building from source if you don't need/want platform-native audio (i.e. ALSA/OpenAL) in node-spotify.

Building from source

node-spotify is prebuilt with node-pre-gyp. If your NodeJS version or architecture is not available it will build automatically from source.

If you want to force a build from source you can run npm install node-spotify --build-from-source. There's one special option you can set when compiling node-spotify: --native_audio=false will compile/link no ALSA/OpenAL audio code (depending on your platform). Default is true. This is both settable for node-gyp and npm.

node-spotify uses Nan to compile on different NodeJS versions. 0.10, 0.12, 4.x, 5.x, 6.x. should all work.

If you use OSX and have installed libspotify as a framework you need to edit the binding.gyp file. Remove "-lspotify" and write instead as one link option: "-framework OpenAL -framework libspotify". This is due to a bug in node-gyp that will eliminate a duplicate "-framework" entry from the link settings. If you have installed libspotify via homebrew you don't need this step.

Used software

  • Base64 encoder from https://github.com/superwills/NibbleAndAHalf
  • Sound playback is heavily based on https://developer.spotify.com/docs/libspotify/12.1.51/examples.html