chromecast-api
chromecast-api copied to clipboard
Playlist feature
Hey all,
Since music support is added, I was wondering if this library is a good place for a playlist feature. I'm imagining a class where media objects are stored and played in the order they are added, shuffled or whatever.
I'm not sure if you want to keep this library low-level, or if you are open to expand it with some features.
Thanks for the suggestion @Waxyen :)
IMHO, I think a playlist would require an unnecessary increase in complexity. For example, what if the next media content in the playlist is suddenly not available? Do we throw an error or an event? In that case do we stop the application or close it? (and more problems that I haven't though about yet)
I think these questions must be answered by the user of the library. So it must be done in a separate library which wraps this one or implemented by the user of the library.
What do you think?
Yes it will add some extra complexity. I think it should not be very hard to implement though. If it was optional to have it play via the playlist; enclosed by a try/catch, it would not be that complex at all. If it fails, a callback could be executed with some user-implemented code.
But I agree, maybe it is too much for this library.
You may check https://github.com/thibauts/node-castv2-client/blob/master/examples/queue.js
This library is based on cast-V2-client and that GitHub seems to have a queue (playlist) example.
Oh cool, so it's already implemented.
Seems like a great feature then ;)
Haha awesome! I don't have much time at the moment. But I'd love to get my hands dirty when I do. Otherwise everyone is welcome to do it, if I may speak for all :).