refactor SELECT_PROTOCOL_ACK (4) voice opcode to SESSION_DESCRIPTION

Signed-off-by: Pete Pongpeauk <kurtsiberg@gmail.com>
This commit is contained in:
Pete Pongpeauk
2023-05-04 16:52:26 -04:00
parent 009a3ad27f
commit b95827939d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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,