From 65f45647a69aedbb07f62f7f5991383b7e1a63ce Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Tue, 21 Jul 2026 20:34:02 +0800 Subject: [PATCH] Update RTC configuration to use TURN only and replace STUN server URLs with a specific TURN server address. --- www/js/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/js/main.js b/www/js/main.js index fcf721f..75d261f 100644 --- a/www/js/main.js +++ b/www/js/main.js @@ -14,9 +14,10 @@ const $self = { rtcConfig: { + iceTransportPolicy: 'relay', // TURN only iceServers: [ - { urls: 'stun:stun.l.google.com:19302' }, - { urls: 'stun:stun1.l.google.com:19302' }, + // { urls: 'stun:stun.l.google.com:19302' }, + // { urls: 'stun:stun1.l.google.com:19302' }, ], }, mediaConstraints: { audio: true, video: true }, @@ -630,7 +631,7 @@ function handleScConnectedPeers({ peers, credentials }) { console.log(`Connected peer IDs: ${ids.join(', ')}`); console.log(`TURN Credentials: ${JSON.stringify(credentials)}`); - // addCredentialedTurnServer('turn:coturn.example.com:3478', credentials); + addCredentialedTurnServer('turn:182.92.86.220:3478', credentials); for (let id of ids) { if (id === $self.id) continue;