fridgefm-radio-core
fridgefm-radio-core copied to clipboard
Suggestion: loop playlist with shuffle
-
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.
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());
});