Open dk253 opened 7 years ago
if(typeof volume !== 'undefined') {
if(volume > 0){
var obj = { level: volume/100 };
} else {
var obj = { muted: true };
}
client.setVolume(obj, function(err, newvol){
if(err) {
console.log("there was an error setting the volume")
node.error("Chromecast error: there was an error setting the volume");
msg.error = "there was an error setting the volume";
node.send(msg);
return node.status({
shape: "dot",
fill: "red",
text: "error: there was an error setting the volume"
});
}
console.log("volume changed to %s", Math.round(newvol.level * 100))
});
}
Hey, Thanks for the library! I'm trying to set the volume on a Chromecast Audio. Actually I'm trying to write a web app to control all the volumes on all of the chromecasts at once. How would I use your lib to do that?
Thanks!