-
-
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
Output Stream for AudioPlayer #10489
Comments
your post is a bit vague but changing the behaviour of how a stream acts when piped is bad imo (& a breaking change). there are specific sites that can work right now if you create an audioresource from them and i think that's what you mean with the "web radio" stuff; this is probably the best option |
Well, my idea is "using audioplayer as a web radio server controller", not just playing a 24/7 stream using
The framework above is already done and worked except web radio stream part, the example below works right now:
And I want my web radio stream server has sync audio from AP1 too. Besides, it should be fine if you pipe a stream into multiple streams My bot has ability to play 24/7 stream now already btw, in case you misunderstood my thought. The framework below is what I have to do if you don't add the feature.
|
what's wrong with piping your input to the site separately from the audioplayer (but at the same time)? does it have to go "through" the audioplayer? |
Yes, it has to go through the audioplayer first ,so my web radio site will have same audio that sync with discord. In my best implementation plan, it should have nothing to do with |
What you've suggested for Reading back, you said the ideal solution was
Have you tried setting the |
Oh I didn't know that, so the method2 is kinda useless now.
ye, I did set Besides, there's no way to get data that is processed by |
Yeah, silence frames don't set a "green circle around icon," that would be counterintuitive to actually sending a voice stream. You can get the "data processed by AudioPlayer" by just using it before you pass it into the AudioPlayer. You can synchronise a different stream & the audioplayer by just running the same actions on them.
Sorry but it doesn't make sense at all to get the output of what you're piping into AudioPlayer; it will literally be the same stream, discord does not send the audio data back so you will not know if it's actually received by the channel & if you want silence frames on your secondary stream you can manually push them. If you remove the context of discord it also doesn't make sense. You shouldn't rely on one service to send two identical streams of data to two services, just send the stream to both places separately of context of the other. |
Which application or package is this feature request for?
voice
Feature
I am trying to build a site that can play same music on discord.
here's the part of the code I wrote:
BufferTransformStream
in my class for music processing:
this.webAudioStream
is aBufferingTransform
objectI want data pass from a
AudioPlayer
object tothis.webAudioStream
(so music sync with discord)Ideal solution or implementation
AudioPlayerPlayingState
instead of close/end the output streamMethod1-Add pipe function
Pipe to another stream and AudioPlayerObject doesn't close when the stream that pipe into is closed
Method2-Pretend it's a connection
Init a
VoiceConnection
object using a stream, so it can be sub/unsub just like aVoiceConnection
or
Alternative solutions or implementations
No response
Other context
My target is create a web radio that sync with discord.
It can be done if I pipe them like this:
But the annoying part is that I have to maintain more stuff.
And discord audio might be unstable due to the web radio part, in a discord bot project, so it become a tradeoff between reliability and new web radio function for my bot
The text was updated successfully, but these errors were encountered: