Replay idle audioPlayer in Streamer class

This commit is contained in:
Christer Warén 2023-11-21 06:19:29 +02:00
parent 93b79f8046
commit ccb477faa9

View File

@ -70,6 +70,9 @@ export default class Streamer {
})
.on(AudioPlayerStatus.Idle, () => {
logger('Streamer', station.name + " / " + "Idle");
const url = station.stream[station.stream.default];
const resource = createAudioResource(url);
audioPlayer?.play(resource);
})
.on(AudioPlayerStatus.Paused, () => {
logger('Streamer', station.name + " / " + "Paused");