#Audio stream stops playing

7 messages · Page 1 of 1 (latest)

narrow ocean
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

shy rose
#

Here are the relevant dependencies for the voice functionality of the bot:

"@discordjs/voice": "^0.11.0",
"discord.js": "^14.3.0",
"ffmpeg-static": "^5.1.0",
"libsodium-wrappers": "^0.7.10"
#

Here's some code for reference.

I create the audioResource:

const resource = createAudioResource(config.streamURL);
player.play(resource);

This is config.streamURL:
https://station.throwback.fm:8000/live.mp3
it is a raw mp3 stream source. You can listen using any client that supports it (including your web browser)

As a hackish workaround, I'm listening for IDLE event:

player.on(AudioPlayerStatus.Idle, async () => {
  // stream has become IDLE :(

  await startStream(); // recreate audioResource / restart audio stream
});
#

I'm thinking I may need to open an issue on github at this point.

sturdy hinge
#

how often does it stop playing?

#

just asking to ask, I don't have a solution and this has been a problem for a while in the library

shy rose
# sturdy hinge how often does it stop playing?

If I restart both bot and station. This issue might not start happening for a couple of days or weeks.

But once it starts happening, it seems it'll stop playing at the end of every song.