-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat(voice)!: add support for node.js #931
Conversation
|
||
val ip: InetSocketAddress = connection.socket.discoverIp(server!!, ssrc!!.toInt()) | ||
val ip: SocketAddress = connection.socket.discoverIP(server.value!!, ssrc.value!!.toInt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing, ssrc
would be null
here, this fixes it 🤷🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the atomic delegate is broken?
fun main(args: Array<String>) = runBlocking { | ||
val kord = Kord(args.firstOrNull() ?: error("Missing token")) | ||
@OptIn(DelicateCoroutinesApi::class) | ||
fun main(args: Array<String>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to have nonNative main function which is suspending and then use runBlocking on native
@@ -58,7 +58,7 @@ public class VoiceConnection( | |||
connectionDetachDuration: Duration | |||
) { | |||
public val scope: CoroutineScope = | |||
CoroutineScope(SupervisorJob() + CoroutineName("kord-voice-connection[${data.guildId.value}]")) | |||
CoroutineScope(Dispatchers.Default + SupervisorJob() + CoroutineName("kord-voice-connection[${data.guildId.value}]")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this use the Kord dispatcher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
voice doesn't depend on core. If the scope was able to be configured it could be overridden in the core-voice module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then that's what we should do
|
||
val ip: InetSocketAddress = connection.socket.discoverIp(server!!, ssrc!!.toInt()) | ||
val ip: SocketAddress = connection.socket.discoverIP(server.value!!, ssrc.value!!.toInt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the atomic delegate is broken?
Could you check why the CI failed? |
i was stupid and made a typo lol, should be fine now |
breaking change (for anyone who uses the voice socket) to allow sending & receiving voice in Kotlin/Node.js.
I'm not sure what branch to target but this PR depends on #855