var connect = require('spotify-local-control')
var client = connect()
client.play('spotify:track:0JhKJg5ejeQ8jq89UQtnw8')
client.pause()
client.resume()
client.status().then(res => console.log(res))
Can also be used on the command line:
$ spotify-local-control
Usage:
$ spotify-local-control <command>
Commands:
<default> Show usage
play <uri> Play a track
status Show artist and track
pause Pause the current track
resume Resume the current track
Examples:
$ spotify-local-control play spotify:track:0JhKJg5ejeQ8jq89UQtnw8
Initialize a new client.
Plays the given song by spotifyUri. spotifyContext can be specified to display a related song, playlist, album or artist.
Pauses the playback.
Resumes the playback.
Get status information about the local client.
$ npm install spotify-local-control
- spotify-find - get spotify catalog information