detect all chromecasts in local wifi n/w
npm i chromecast-detector
The app will show detected chromecasts to STDOUT
node index.js
specify the chromecast name and ttl(second) as JSON
node index '{"names":["chrome-cast-name"],"ttl": 60}'
"detect" event is fired
var detector = require('chromecast-detector');
detector.on('detect', function (cast){
console.log(cast);
});
detector.listen();
stop to listen
detector.terminate();
resend the query
detector.sendQuery();