summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-05-05 22:34:51 +1000
committerGitHub <noreply@github.com>2023-05-05 22:34:51 +1000
commit91aecf2a7794c5b077863f8382f17cf43cb8062f (patch)
tree631de134c889dadb4ebcb690a82e59286c18666a /src
parentMerge pull request #1032 from spacebarchat/openapi (diff)
parentrefactor SELECT_PROTOCOL_ACK (4) voice opcode to SESSION_DESCRIPTION (diff)
downloadserver-91aecf2a7794c5b077863f8382f17cf43cb8062f.tar.xz
Merge pull request #1048 from ppongpeauk/patch1
refactor SELECT_PROTOCOL_ACK (4) voice opcode to SESSION_DESCRIPTION
Diffstat (limited to 'src')
-rw-r--r--src/webrtc/opcodes/SelectProtocol.ts4
-rw-r--r--src/webrtc/util/Constants.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/webrtc/opcodes/SelectProtocol.ts b/src/webrtc/opcodes/SelectProtocol.ts
index 6618d83b..0a06e722 100644
--- a/src/webrtc/opcodes/SelectProtocol.ts
+++ b/src/webrtc/opcodes/SelectProtocol.ts
@@ -18,7 +18,7 @@
 
 import { Payload, Send, WebSocket } from "@spacebar/gateway";
 import { SelectProtocolSchema, validateSchema } from "@spacebar/util";
-import { endpoint, PublicIP, VoiceOPCodes } from "@spacebar/webrtc";
+import { PublicIP, VoiceOPCodes, endpoint } from "@spacebar/webrtc";
 import SemanticSDP, { MediaInfo, SDPInfo } from "semantic-sdp";
 
 export async function onSelectProtocol(this: WebSocket, payload: Payload) {
@@ -56,7 +56,7 @@ export async function onSelectProtocol(this: WebSocket, payload: Payload) {
 		`a=candidate:1 1 ${candidate.getTransport()} ${candidate.getFoundation()} ${candidate.getAddress()} ${candidate.getPort()} typ host`;
 
 	await Send(this, {
-		op: VoiceOPCodes.SELECT_PROTOCOL_ACK,
+		op: VoiceOPCodes.SESSION_DESCRIPTION,
 		d: {
 			video_codec: "H264",
 			sdp: answer,
diff --git a/src/webrtc/util/Constants.ts b/src/webrtc/util/Constants.ts
index bd89c974..dba1c511 100644
--- a/src/webrtc/util/Constants.ts
+++ b/src/webrtc/util/Constants.ts
@@ -29,7 +29,7 @@ export enum VoiceOPCodes {
 	SELECT_PROTOCOL = 1,
 	READY = 2,
 	HEARTBEAT = 3,
-	SELECT_PROTOCOL_ACK = 4,
+	SESSION_DESCRIPTION = 4,
 	SPEAKING = 5,
 	HEARTBEAT_ACK = 6,
 	RESUME = 7,