summary refs log tree commit diff
path: root/webrtc/src/opcodes/Identify.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--webrtc/src/opcodes/Identify.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/webrtc/src/opcodes/Identify.ts b/webrtc/src/opcodes/Identify.ts
new file mode 100644

index 00000000..2026d7c9 --- /dev/null +++ b/webrtc/src/opcodes/Identify.ts
@@ -0,0 +1,20 @@ +import { WebSocket } from "@fosscord/gateway"; +import { Payload } from "./index" +import { VoiceOPCodes } from "@fosscord/util"; + +export async function onIdentify(socket: WebSocket, data: Payload) { + socket.send(JSON.stringify({ + op: VoiceOPCodes.READY, + d: { + ssrc: 1, + ip: "127.0.0.1", + port: 3005, + modes: [ + "xsalsa20_poly1305", + "xsalsa20_poly1305_suffix", + "xsalsa20_poly1305_lite", + ], + heartbeat_interval: 1, + }, + })); +} \ No newline at end of file