-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Broadcast stops playing after a certain time on some channels #5531
Comments
@trywesley Can you attach the debug log by adding these loggers to your bot/client event listener: client.on("debug", console.log)
client.on("error", console.error)
client.on("warn", console.warn) |
I'm also experiencing this issue. My audio stops playing after approximately 350–450 seconds. I've added the above logs, and when the audio stops playing, I get this message:
Issues #4007 and #4021 seem related. I'm playing the audio by passing in a URL to an MP3 file. I'm going to try and save the file locally to see if that helps. |
@vladh @trywesley Could you both show/send the code you are using to play the File/URL. |
The code I was using is basically just this (simplified):
I'm not using ytdl. Right now I've changed it to download the file and just play it off the disk, so:
It's been playing for the past 600 seconds, so I think the issue was with the connection to the server serving the MP3 file. Perhaps something causes it to be prematurely terminated. I'll keep you updated. |
Update: I've saved the file locally before playing it, and playback doesn't stop anymore. It's probably a good idea to save the file anyway, so, it's all good. Most likely, the code that does the HTTP request to get the file only manages to download some initial chunk of it. Maybe it's a |
I must say, I have this same problem with ytdl-core-discord (which may inherit the problem from ytdl-core). Which further makes me think that there is some HTTP related issue. 🤔 |
I have a similiar problem. I am also playing an url stream with the broadcast dispatcher. (No yt-dl library) After arround 1-3 hours the stream stops playing in some voice channels. If I rejoin the bot to the voice channel, the stream is working perfectly fine again. It is like the channel dispatcher is re-subscribing to the broadcast when rejoining. So the broadcast dispatcher seems to work. |
Hi there, We're working on a new implementation of Discord's Voice API that has better playback quality and is more reliable than what we currently support in Discord.js v12 - check it out at https://github.com/discordjs/voice! The new library solves many of the issues that users are facing, and as part of this, we're dropping built-in support for voice in our next major release. We have a PR (#5402) that adds native support for our new voice library - once this PR is merged, this issue will be closed. You can still use our new voice library before that PR lands - just take a look at our music bot example to see how to get started upgrading your voice code. By using the boilerplate music player in the example, you can make it even easier to upgrade your code. Note that the PR above only reduces some of the boilerplate code you'd otherwise have to write - you do not have to wait for the PR to be merged to start using the new voice library. If you have any questions about this, feel free to:
|
Please describe the problem you are having in as much detail as possible:
Im developing a radio bot, using discords Broadcast system. After a time connected in a call, the bot simply stops playing the broadcast on the call and only resumes if it is reconnected. I already tested if it was enough to change the broadcast or just use the
.play(<broadcast>)
method again but I wasnt successful. It doesnt happen on all channels at the same time, each time a channel is affected by the problem. No errors are returned.Further details:
The text was updated successfully, but these errors were encountered: