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

Casts are not updated when switching networks #9

Open
jostrander opened this issue Jul 9, 2016 · 4 comments
Open

Casts are not updated when switching networks #9

jostrander opened this issue Jul 9, 2016 · 4 comments

Comments

@jostrander
Copy link
Member

Currently only showing a cast device from my work network, and it hasn't updated to show my two home chromecasts at home. In theory it should drop the old devices via serviceDown and bring in the new ones via serviceUp however I think the scanning may have stopped when the network dropped, or the laptop went to sleep.

@MarshallOfSound
Copy link
Member

Possibly just a simple fix of

setInterval(() => browser.start(), 60000)

?

@jostrander
Copy link
Member Author

I think I'd rather use network state events such as these here:

http://electron.atom.io/docs/tutorial/online-offline-events/

Just not sure how we'd integrate it, or if this will fully fix it.

@MarshallOfSound
Copy link
Member

window.addEventListener('online', browser.start)

??

I'm not sure if this will actually fix the issue. serviceDown takes a long time to fire normally anyway.

@jostrander
Copy link
Member Author

Fair call, but serviceDown isn't my main concern. I think the timeout might work better, but we'd need to check if the existing browser crashed before launching a new one, or bring down the browser every time, but then we'd lose the list of available devices stored in the browser and we'll never receive the serviceDown event, which would cause the list to never be cleaned up.

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