mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-28 18:29:26 +00:00
Fix video schema to allow a bunch of undefineds
This commit is contained in:
@@ -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 };
|
||||
}[];
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user