summary refs log tree commit diff
path: root/webrtc/src/opcodes/SelectProtocol.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-01-16 02:37:38 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-01-16 02:38:43 +1100
commit1569fec0cf23442b176b2a9a775208349aa719ed (patch)
treef36aff30a3d5e82f569fa7815c83a33a3066c7d3 /webrtc/src/opcodes/SelectProtocol.ts
parentFix typo in commit 277b28c (diff)
downloadserver-1569fec0cf23442b176b2a9a775208349aa719ed.tar.xz
boilerplate stuff
Diffstat (limited to 'webrtc/src/opcodes/SelectProtocol.ts')
-rw-r--r--webrtc/src/opcodes/SelectProtocol.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/webrtc/src/opcodes/SelectProtocol.ts b/webrtc/src/opcodes/SelectProtocol.ts
new file mode 100644

index 00000000..f1732dd9 --- /dev/null +++ b/webrtc/src/opcodes/SelectProtocol.ts
@@ -0,0 +1,16 @@ +import { WebSocket } from "@fosscord/gateway"; +import { Payload } from "./index"; +import { VoiceOPCodes } from "@fosscord/util"; + +export async function onSelectProtocol(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", + audio_codec: "opus", + } + })); +} \ No newline at end of file