thibauts / node-castv2-client

A Chromecast client based on the new (CASTV2) protocol
MIT License
648 stars 95 forks source link

Add scanner? #66

Closed angelnu closed 7 years ago

angelnu commented 7 years ago

Hi,

should I propose a pull request to add an scanner for chromecast devices?

I was thinking in something similar to the scanner in my iobroker project. I took a subset as well for #65 .

thibauts commented 7 years ago

As discussed in previous issues, i'd prefer to leave it to other modules. A simple example in the readme could do the trick, imo.

angelnu commented 7 years ago

Ok, then we can close this.

I am thinking in splitting the base functions in my project such as scanning and media queries to an extra module.

thibauts commented 7 years ago

There is this module for scanning. It has been developed by someone who has good understanding of the chromecast ecosystem. Could you use it in your examples ? Reflecting this in the README would be perfect, too. But I'll do it when I have some free time if you can't.

angelnu commented 7 years ago

For the base examples the chromecast-scanner would work but it has some limitations to be aware of:

I will see if I can prepare a pull request to add these capabilities to the chromecast-scanner so that I do not need my own fork.

thibauts commented 7 years ago

Would be nice to update the scanner module or publish another clean one which handles multiple devices cleanly.

angelnu commented 7 years ago

I have cloned the module and will work on the changes later. Then I will ask @xat if he want the changes or if he prefers a new module.

Currently I am working in a a player that makes easier to work with the playlist. Ideally it will accept a pls or m3u file, covert it to a chromecast list and start playing it.

I will also add support for announcements so that I can play URL in a playing device and then resume the original playlist. I need this to support playing a text such as forecast test to devices playing my music. (More details here)

thibauts commented 7 years ago

Do as you like, as long as the examples and README use a simple scanner without including its code in thie module it's fine with me :)

angelnu commented 7 years ago

Fyi: I ended up splitting the code from my previous project and creating and stand alone player that is able to handle playlists, re-connects/retries, announcements, retrieving metadata via ICY, etc.

https://github.com/angelnu/castv2-player