Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider splitting out update events #54

Open
rikkertkoppes opened this issue Jan 5, 2016 · 1 comment
Open

Consider splitting out update events #54

rikkertkoppes opened this issue Jan 5, 2016 · 1 comment

Comments

@rikkertkoppes
Copy link

Working with a chromecast here. An update event is triggered when the device is first discovered. However, when chromecast switches application, it updates the txt field in the message, which sets the isNew flag, which triggers the update event as well.

I am only interested in really new devices, which is pretty much captured by all the other changes that set the isNew flag:

  • change in port
  • change in host
  • change in address
  • new serviceKeys

A change in data.txt seems like a peculiar one. I'd propose the following

  • emit a serviceUp event (like mdns does) on the above 4 conditions (maybe ignoring subtypes as well?)
  • emit an update event on the above 4 conditions and a change in data.txt (as is currently the case)
  • maybe emit a message event on every packet that is received (that contains data)

In my specific case, commenting out browser.js:94 works, but that's a little harsh to do in general

@kmpm
Copy link
Collaborator

kmpm commented Jul 29, 2016

I agree.

This is something that I have wanted as well but there haven't been any time to fix it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants