changes
This commit is contained in:
parent
1ff38287a6
commit
625cf56d39
@ -29,7 +29,7 @@ import {
|
|||||||
export async function onSpeaking(this: WebRtcWebSocket, data: VoicePayload) {
|
export async function onSpeaking(this: WebRtcWebSocket, data: VoicePayload) {
|
||||||
if (!this.webRtcClient) return;
|
if (!this.webRtcClient) return;
|
||||||
|
|
||||||
Promise.all(
|
await Promise.all(
|
||||||
Array.from(
|
Array.from(
|
||||||
mediaServer.getClientsForRtcServer<WebRtcWebSocket>(
|
mediaServer.getClientsForRtcServer<WebRtcWebSocket>(
|
||||||
this.webRtcClient.rtc_server_id,
|
this.webRtcClient.rtc_server_id,
|
||||||
|
@ -37,8 +37,12 @@ export async function onVideo(this: WebRtcWebSocket, payload: VoicePayload) {
|
|||||||
where: { id: rtc_server_id },
|
where: { id: rtc_server_id },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!stream) return;
|
||||||
|
|
||||||
// only the stream owner can publish to a go live stream
|
// 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);
|
const stream = d.streams?.find((element) => element !== undefined);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user