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

Suggestion: loop playlist with shuffle #331

Open
feyli opened this issue Apr 20, 2023 · 1 comment
Open

Suggestion: loop playlist with shuffle #331

feyli opened this issue Apr 20, 2023 · 1 comment

Comments

@feyli
Copy link

feyli commented Apr 20, 2023

  • I'm submitting a ...
    [ ] feature request

  • Summary

It would just be great to have a way to do this:
The radio starts, immediately shuffles the playlist, and plays it. When the playlist ends, the radio shuffles it again and plays it over. It would do this over and over, every time looping another shuffle of the same playlist.

@ch1ller0
Copy link
Owner

Hey! Thanks for the suggestion.
Does this code cover your case?

const { SHUFFLE_METHODS } = require('@fridgefm/radio-core')

station.on(PUBLIC_EVENTS.START, () => {
  station.reorderPlaylist(SHUFFLE_METHODS.randomShuffle());
});

station.on(PUBLIC_EVENTS.RESTART, () => {
  station.reorderPlaylist(SHUFFLE_METHODS.randomShuffle());
});

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

No branches or pull requests

2 participants