summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-19 09:03:00 +0100
committerRory& <root@rory.gay>2026-03-19 09:03:00 +0100
commit6438953a4ba1b885fb0f9e9df23c077875ec331f (patch)
tree98c62a1b9920960559e09340f6cb037197130402
parentFix some comments (diff)
downloadserver-ts-6438953a4ba1b885fb0f9e9df23c077875ec331f.tar.xz
Fix video schema to allow a bunch of undefineds
-rw-r--r--src/schemas/webrtc/VoiceVideoSchema.ts14
-rw-r--r--src/webrtc/opcodes/Video.ts3
2 files changed, 10 insertions, 7 deletions
diff --git a/src/schemas/webrtc/VoiceVideoSchema.ts b/src/schemas/webrtc/VoiceVideoSchema.ts

index 64f301cb..95df02fe 100644 --- a/src/schemas/webrtc/VoiceVideoSchema.ts +++ b/src/schemas/webrtc/VoiceVideoSchema.ts
@@ -24,12 +24,12 @@ export interface VoiceVideoSchema { streams?: { type: "video" | "audio" | "screen"; rid: string; - ssrc: number; - active: boolean; - quality: number; - rtx_ssrc: number; - max_bitrate: number; - max_framerate: number; - max_resolution: { type: string; width: number; height: number }; + ssrc?: number; + active?: boolean; + quality?: number; + rtx_ssrc?: number; + max_bitrate?: number; + max_framerate?: number; + max_resolution?: { type: string; width: number; height: number }; }[]; } diff --git a/src/webrtc/opcodes/Video.ts b/src/webrtc/opcodes/Video.ts
index 38eb419b..323438a6 100644 --- a/src/webrtc/opcodes/Video.ts +++ b/src/webrtc/opcodes/Video.ts
@@ -105,6 +105,9 @@ export async function onVideo(this: WebRtcWebSocket, payload: VoicePayload) { } // check if client has signaled that it will send video if (wantsToProduceVideo) { + // TODO: fix spacebar-webrtc-types... + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error this.webRtcClient!.videoStream = { ...stream, type: "video" }; // client sends "screen" on go live but expects "video" on response // check if we are already publishing video, if not, publish a new video track for it if (!this.webRtcClient!.isProducingVideo()) {