Open simonravel opened 5 years ago
Hi @simonravel,
I think the error is here:
client.getVolume('volume', function(vol){
you don't have to pass any parameters (except callback function), the correct method's call is:
this.client.getVolume(function (err, vol) { ... })
also pay attention to first callback parameters, is an error object (null if no error is released) not the current volume infos.
Here an example:
this.client.getVolume(function (err, vol) {
if (err) {
console.error(err) // handle error
return
}
console.log(vol) // {"controlType":"attenuation","level":0.7999999523162842,"muted":false,"stepInterval":0.05000000074505806}
})
I tried to use this function:
Which results in: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getVolume' of null