diff --git a/src/webrtc/Server.ts b/src/webrtc/Server.ts index 312a97c9b..bc26f3d19 100644 --- a/src/webrtc/Server.ts +++ b/src/webrtc/Server.ts @@ -66,12 +66,12 @@ export class Server { // try to load webrtc library, if failed just don't start webrtc endpoint try { await loadWebRtcLibrary(); + await mediaServer.start(WRTC_PUBLIC_IP, WRTC_PORT_MIN, WRTC_PORT_MAX); } catch (e) { console.log(`[WebRTC] ${yellow("WEBRTC disabled")}`); return; } - await mediaServer.start(WRTC_PUBLIC_IP, WRTC_PORT_MIN, WRTC_PORT_MAX); if (!this.server.listening) { this.server.listen(this.port); console.log(`[WebRTC] ${green(`online on 0.0.0.0:${this.port}`)}`); diff --git a/src/webrtc/opcodes/Identify.ts b/src/webrtc/opcodes/Identify.ts index 509767949..d61d4bbbc 100644 --- a/src/webrtc/opcodes/Identify.ts +++ b/src/webrtc/opcodes/Identify.ts @@ -91,7 +91,7 @@ export async function onIdentify(this: WebRtcWebSocket, data: VoicePayload) { }); // the server generates a unique ssrc for the audio and video stream. Must be unique among users connected to same server - // UDP clients will respect this ssrc, but websocket clients will generate and replace it with their own + // UDP clients will respect this ssrc, but webrtc clients will generate and replace it with their own const generatedSsrc: SSRCs = { audio_ssrc: generateSsrc(), video_ssrc: generateSsrc(),