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.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/webrtc/src/opcodes/Identify.ts b/webrtc/src/opcodes/Identify.ts

index 2026d7c9..6043a460 100644 --- a/webrtc/src/opcodes/Identify.ts +++ b/webrtc/src/opcodes/Identify.ts
@@ -1,14 +1,17 @@ import { WebSocket } from "@fosscord/gateway"; import { Payload } from "./index" import { VoiceOPCodes } from "@fosscord/util"; +import { Server } from "../Server" -export async function onIdentify(socket: WebSocket, data: Payload) { +export async function onIdentify(this: Server, socket: WebSocket, data: Payload) { socket.send(JSON.stringify({ op: VoiceOPCodes.READY, d: { ssrc: 1, ip: "127.0.0.1", - port: 3005, + + //@ts-ignore + port: this.mediasoupTransports[0].iceCandidates.port, modes: [ "xsalsa20_poly1305", "xsalsa20_poly1305_suffix",