Fix video schema to allow a bunch of undefineds

This commit is contained in:
Rory&
2026-03-19 09:03:00 +01:00
parent 85190daff9
commit 6438953a4b
2 changed files with 10 additions and 7 deletions
+7 -7
View File
@@ -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 };
}[];
}
+3
View File
@@ -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()) {