From e731a369e56fc02a667b9b28043ff23ea6c433be Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Mon, 7 Mar 2022 22:57:37 +1100 Subject: VOICE CONNECTS!!! Dtls stuck on "connecting" state + currently no way to edit/inspect packets received or use own packet format in mediasoup ( fork? ) --- webrtc/src/opcodes/Connect.ts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'webrtc/src/opcodes/Connect.ts') diff --git a/webrtc/src/opcodes/Connect.ts b/webrtc/src/opcodes/Connect.ts index b312d6f2..1f874a44 100644 --- a/webrtc/src/opcodes/Connect.ts +++ b/webrtc/src/opcodes/Connect.ts @@ -2,8 +2,38 @@ import { WebSocket } from "@fosscord/gateway"; import { Payload } from "./index"; import { Server } from "../Server" +/* +Sent by client: + +{ + "op": 12, + "d": { + "audio_ssrc": 0, + "video_ssrc": 0, + "rtx_ssrc": 0, + "streams": [ + { + "type": "video", + "rid": "100", + "ssrc": 0, + "active": false, + "quality": 100, + "rtx_ssrc": 0, + "max_bitrate": 2500000, + "max_framerate": 20, + "max_resolution": { + "type": "fixed", + "width": 1280, + "height": 720 + } + } + ] + } +} +*/ + export async function onConnect(this: Server, socket: WebSocket, data: Payload) { - socket.send(JSON.stringify({ + socket.send(JSON.stringify({ //what is op 15? op: 15, d: { any: 100 } })) -- cgit 1.5.1