From b1dc6b34ddb0c27b99f4203043d4f2ba0fcee375 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 16 Jan 2022 03:35:30 +1100 Subject: messing around with things I don't understand --- webrtc/src/opcodes/SelectProtocol.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webrtc/src/opcodes/SelectProtocol.ts') diff --git a/webrtc/src/opcodes/SelectProtocol.ts b/webrtc/src/opcodes/SelectProtocol.ts index f1732dd9..fcc45855 100644 --- a/webrtc/src/opcodes/SelectProtocol.ts +++ b/webrtc/src/opcodes/SelectProtocol.ts @@ -1,15 +1,16 @@ import { WebSocket } from "@fosscord/gateway"; import { Payload } from "./index"; import { VoiceOPCodes } from "@fosscord/util"; +import { Server } from "../Server" -export async function onSelectProtocol(socket: WebSocket, data: Payload) { +export async function onSelectProtocol(this: Server, socket: WebSocket, data: Payload) { socket.send(JSON.stringify({ op: VoiceOPCodes.SESSION_DESCRIPTION, d: { video_codec: "H264", secret_key: new Array(32).fill(null).map(x => Math.random() * 256), mode: "aead_aes256_gcm_rtpsize", - media_session_id: "d8eb5c84d987c6642ec4ce72ffa97f00", + media_session_id: this.mediasoupTransports[0].id, audio_codec: "opus", } })); -- cgit 1.5.1