AudioPlayer goes from buffering -> playing -> idle and warns that resource is not playable
Hi,
I have troubles for the last months with playback of resources.
The source is available at https://github.com/manuel-rw/jellyfin-discord-music-bot
Even though the stream URL seems correct to me, the bot goes into
idle
after a few milliseconds and it stays silent in Discord.
I have tried different variations of the stream URL but they dont' seem to change anything. It used to work fine - I did not make an update of discord.js in the mean time.
The code playing for resources is distributed, but let me summarise it shortly:
All relevant code in discord.voice.service.ts
Log: https://pastebin.com/ZGyrYzmQ
I already added tons of debugging branches & log statements to troubleshoot.
Do you have suggestions for the next steps? How can I troubleshoot resources that can't be played?
Also, the docs don't go into much detail why resources aren't "playable".
I read the following pages and could not find further steps / ideas: https://discordjs.guide/voice/audio-resources.html#cheat-sheet, https://discord.js.org/docs/packages/voice/0.13.0/AudioPlayer:Class#checkPlayable
Node: v20.13.1
Crosspost from #djs-questions , wrong channel. Sorry.4 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Hi, any updates?
Tried even more debugging, with no success. Any ideas?
@Manicraft1001 may seem silly but just check all these are true
i had a similar issue when i didn’t have the right intent
any info on what that debugging would be?
when you do
isPlayable
it pretty much just checks whether the stream is readable after checking if the audioplayer is actually playing
i.e. what does it look like if you listen to stateChange
on the audioplayer ?