andrehaveman / spotify-node-applescript

Control Spotify on Mac OSX with NodeJS and AppleScript
MIT License
316 stars 38 forks source link

Allow to set absolute volume #4

Closed rmehner closed 11 years ago

rmehner commented 11 years ago

This allows to set the absolute volume of spotify. Note that sometimes you'll run into a off-by-one error as spotify returns a volume that is often one higher than the one you actually set. For example:

spotify.setVolume(42, function() {
  spotify.getState(function(err, state) {
    console.log(state.volume); // will output: 41
  });
});

This shouldn't have any noticable effect for the user of the library though.

rmehner commented 11 years ago

I've also updated the documentation for this, sorry for the oversight beforehand :)