From 8801c044a7cd92bbbee94674080e2c02cde411ce Mon Sep 17 00:00:00 2001 From: Anastasiia Kim <70285484+gingermuffin@users.noreply.github.com> Date: Sun, 21 Dec 2025 23:33:33 +0000 Subject: [PATCH] Fix WebRTCProvider inizialization (#328) --- src/app/api/ice/route.ts | 4 ++-- src/components/WebRTCProvider.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/ice/route.ts b/src/app/api/ice/route.ts index fe965ef..7c4c7ff 100644 --- a/src/app/api/ice/route.ts +++ b/src/app/api/ice/route.ts @@ -10,7 +10,7 @@ const peerjsPath = process.env.PEERJS_PATH || '/' export async function POST(): Promise { if (!process.env.COTURN_ENABLED) { return NextResponse.json({ - host: peerjsHost, + host: peerjsHost, path: peerjsPath, iceServers: [{ urls: stunServer }], }) @@ -25,7 +25,7 @@ export async function POST(): Promise { await setTurnCredentials(username, password, ttl) return NextResponse.json({ - host: peerjsHost, + host: peerjsHost, path: peerjsPath, iceServers: [ { urls: stunServer }, diff --git a/src/components/WebRTCProvider.tsx b/src/components/WebRTCProvider.tsx index 0153e87..dc7fb55 100644 --- a/src/components/WebRTCProvider.tsx +++ b/src/components/WebRTCProvider.tsx @@ -41,10 +41,10 @@ async function getOrCreateGlobalPeer(): Promise { globalPeer = new Peer({ debug: 3, + host, + path, config: { iceServers, - host, - path, }, }) }