REST API to control playback on iTunes on OS X. Based on my fork of local-itunes and Express.
Install with npm
:
$ npm install itunes-control-api
Import the node module in your js file and call start with the desired port:
var iTunesAPI = require('itunes-control-api');
iTunesAPI.start(8080);
Returns state of the playback (playing/paused).
Plays music.
Pauses music.
Toggles play/pause.
Go to previous track or beginning of the current track.
Go to next track.