Play/pause Spotify on Chromecast using HTTP requests
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
package.json
spotify-chromecast-player.service

README.md

Spotify Chromecast player

This app allows to play/pause Spotify on Chromecast automatically.

  • play music from where you left on another device
http://localhost:3000/play
  • play music from hardcoded list
http://localhost:3000/play/fav
  • play music from specific Spotify URI
http://localhost:3000/play/{uri}
  • pause music
http://localhost:3000/pause
  • pause music in future
http://localhost:3000/pause/{minutes}
  • cancel future music pause
http://localhost:3000/pause/cancel

Prerequisites

  • node.js 6.x or newer
  • git
  • native compile tools
  • libavahi
sudo apt-get install git gcc g++ make libavahi-compat-libdnssd-dev

Check out branch no-autodiscovery for code without libavahi dependency (no other native deps).

How to start

Install dependencies:

npm install

Export env variables:

expott PORT=... #port number for service (default 3000)
export DEVICE_NAME=... #name of your chromecast device
export SPOTIFY_USERNAME=...
export SPOTIFY_PASSWORD=...

Start the app:

npm start

Credits

This project is evolution of: