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
playOpusStream() broken #2079
Comments
If you're able to, can you test to see if this is fixed in the voice rewrite branch? |
I get an entirely different issue in the voice-rewrite branch. The function does indeed work, but large chunks of the stream are just ignored and skipped. Here's a video. It's supposed to be a 4 minute long track. I'm using the exact same code sample. |
Ok, I can reproduce this and am looking for a fix. |
I've looked into it and the way the new voice rewrite works, I don't think it'll be possible to get this to work. Because now, We'll probably introduce a nicer way for discord.js to handle this for you in the voice rewrite, but for now you can use prism-media (it comes installed with the voice rewrite!) to handle this. All you have to do is make sure your ffmpeg output is in an ogg container (switch const prism = require('prism-media'); // use indev branch
connection.playOpusStream(ffmpegStream.pipe(new prism.OggOpusDemuxer())); |
Can confirm that the rewrite fixes the issue in 11.1 and up. |
This fixes #2079 (VoiceConnection#playOpusStream being broken)
Should be fixed with the referenced commit. |
Please describe the problem you are having in as much detail as possible:
After updating to discord.js 11.2.1, the play playOpusStream() function stopped working properly.
This is the traceback given by the error handler:
Include a reproducible code sample here, if possible:
(The code above works perfectly fine on d.js 11.1.0, which is the version i was using before)
Further details:
npm install
with discord.js@^11.0.0 as a dependency will automatically install the latest version.29a81ea
The text was updated successfully, but these errors were encountered: