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

Playlist feature #29

Open
Waxyen opened this issue Dec 24, 2019 · 5 comments
Open

Playlist feature #29

Waxyen opened this issue Dec 24, 2019 · 5 comments

Comments

@Waxyen
Copy link

Waxyen commented Dec 24, 2019

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.

@alxhotel
Copy link
Owner

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?

@Waxyen
Copy link
Author

Waxyen commented Dec 27, 2019

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.

@mAPBhlJ
Copy link

mAPBhlJ commented Jan 2, 2020

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.

@alxhotel
Copy link
Owner

alxhotel commented Jan 8, 2020

Oh cool, so it's already implemented.

Seems like a great feature then ;)

@Waxyen
Copy link
Author

Waxyen commented Jan 14, 2020

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 :).

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