Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

A Spotify Now Playing widget that's accessible with anything that can render a webpage

License

Notifications You must be signed in to change notification settings

dustinblackman/nowplaying-widget

Repository files navigation

Now Playing Widget

beartooth

David David Travis Codecov Docker Hub

Deploy Deploy to Docker Cloud

A Spotify Now Playing widget that's accessible with anything that can render a webpage. Users automatically register and authorize by browsing to /user/NAME where they will be redirected to a Spotify authorization page, and then redirected back to the render. Refreshes every 2 seconds by default. The original purpose of this project was to display the now playing song on Twitch streams with OBS' browser view.

Design inspired by https://github.com/levifig/now-playing.widget

Setup / Building From Source

Start by creating an app on Spotify. After creating, add the following Redirect URIs. http://YOURDOMAIN.com/authorize/callback. This can be set to localhost if you wish to only use this locally, http://localhost:PORT/authorize/callback.

Run the following to install and compile to Javascript.

yarn install
yarn build

You'll find default configuration in dist/server/config/default.js. You can also make a local copy at dist/server/config/local.js that will override any defaults. Everything can be configured using the same keys in environment variables as well.

To start after configuration:

yarn start

Afterwards you can navigate to http://YOURDOMAIN.com/user/NAME and see it in action.

Development

You can hack away with hot reloading enabled by executing yarn dev.

Contributing

Contributions are welcome! Be sure to run yarn test before submitting any PRs.

About

A Spotify Now Playing widget that's accessible with anything that can render a webpage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published