show people

master
Valerie 2021-06-15 20:19:39 -04:00
parent d799d4dc7a
commit 655cb671f9
1 changed files with 11 additions and 4 deletions

View File

@ -7,10 +7,14 @@ const mdns = bonjour();
const ID = uuid.v4();
let devices = [];
type Player = {
name: string,
address: string,
port: number
class Player {
name: string;
address: string;
port: number;
toString() {
return ` ${this.name}`;
}
}
const network = {
@ -33,4 +37,7 @@ mdns.find({
type: 'dfi'
}, (service) => {
log.info('found network device', service);
const p = new Player();
p.name = service.fqdn;
devices.push(p);
});