xat / chromecast-player

simple chromecast player
MIT License
99 stars 20 forks source link

getVolume returns null #2

Closed hinzundcode closed 9 years ago

hinzundcode commented 9 years ago

Very nice project ;) I only have a problem with getVolume, the callback gets null instead of the volume, what am I doing wrong?

var player = require('chromecast-player')();
player.attach(function (err, p) {
    p.getVolume(function (vol) {
        console.log(vol);
    });
});
xat commented 9 years ago

Thanks :) The signature of the the callback is err, vol. So you are actually logging err at the moment.

hinzundcode commented 9 years ago

Aaah, okay. Thanks for your quick reply ;)