alxhotel / chromecast-api

:tv: Chromecast Node.js module
MIT License
155 stars 49 forks source link

Devices not showing up #88

Open Paul243-gif opened 11 months ago

Paul243-gif commented 11 months ago

I was running the original usage code from README.md, but it didn't work. So I modified it a bit to be sure I'm getting devices:

const ChromecastAPI = require('chromecast-api');
const client = new ChromecastAPI();

console.log(client.devices);
client.update();
console.log(client.devices);
client.on('device', (devices) => console.log(devices) );
console.log(client.devices);

But nothing seemed to work. The output was:

[]
[]
[]

I can't get it to find devices, even though I have my devices all turned on, with chromecast working. And I know it works, because when I use Popcorn Time it finds the devices with chromecast. What am I doing wrong?