Closed arpitflex closed 1 year ago
Because you're applying that to the audioPlayer.
This fix should be applied on the VoiceConnection object.
This line returns a VoiceConnection object, you can apply it there https://github.com/larsrickert/discord-player-plus/blob/e54f74ab5b8bd74a34ee9e1d8ef551ed08614fad/src/player.ts#L268
Hey, thanks for reporting the issue! I will investigate this and will look at it ASAP!
Because you're applying that to the audioPlayer.
This fix should be applied on the VoiceConnection object.
This line returns a VoiceConnection object, you can apply it there
This fixes it! I didn't notice the issue as I was quick testing the fix through the player.js in the node_modules. Thanks for the help @vittee.
I have made a PR #10, maybe this helps with your investigation @larsrickert. Not exactly sure how to go about temporary fixes/what should be done when the bug in @discordjs/voice is fixed.
:tada: This issue has been resolved in version 1.4.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Describe the bug
After 50-60 seconds of a voice connection, the bot stops playing. This applies to any song or for any server.
When researching this issue, the issue seems to stem from a bug in @discordjs/voice. There are many users with this issue right now https://github.com/discordjs/discord.js/issues/9185, with analysis into the bug can be found here: https://github.com/discordjs/discord.js/issues/9185#issuecomment-1452510633.
However, the quick fix recommended by the other users in the thread, specifically https://github.com/discordjs/discord.js/issues/9185#issuecomment-1452514375, does not seem to work with discord-player-plus.
The fix was attempted by changing player.js to include the
networkStateChangeHandler
function and the additionalstateChange
listener to the audio connection.This fix seems to work for many of the other users with the same issue, but it doesn't seem to work with discord-player-plus (or at least the way I have incorporated it).
Reproduction
Step 1: Have bot running Step 2: Queue up a song (optimally longer than 60 seconds) Step 3: Let bot play the song Step 4: Bot will abruptly stop at around 50-60 seconds.
System Info
Validations