This commit is contained in:
dank074 2025-04-17 00:19:36 -05:00
parent 1ff38287a6
commit 625cf56d39
2 changed files with 6 additions and 2 deletions

View File

@ -29,7 +29,7 @@ import {
export async function onSpeaking(this: WebRtcWebSocket, data: VoicePayload) {
if (!this.webRtcClient) return;
Promise.all(
await Promise.all(
Array.from(
mediaServer.getClientsForRtcServer<WebRtcWebSocket>(
this.webRtcClient.rtc_server_id,

View File

@ -37,8 +37,12 @@ export async function onVideo(this: WebRtcWebSocket, payload: VoicePayload) {
where: { id: rtc_server_id },
});
if (!stream) return;
// only the stream owner can publish to a go live stream
if (stream?.owner_id != this.user_id) return;
if (stream?.owner_id != this.user_id) {
return;
}
}
const stream = d.streams?.find((element) => element !== undefined);