From 28d2561548d5b6bcb18d344b5759f0bfa82c3b96 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 10 Feb 2026 15:23:10 +0800
Subject: [PATCH] feat:添加

---
 applications/drone-command/src/views/audioCall.vue |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/applications/drone-command/src/views/audioCall.vue b/applications/drone-command/src/views/audioCall.vue
index b1fcb28..aa0cbaf 100644
--- a/applications/drone-command/src/views/audioCall.vue
+++ b/applications/drone-command/src/views/audioCall.vue
@@ -38,8 +38,8 @@
 /** ✅ 你的 WS 地址前缀(后面拼 userId) */
 const WS_BASE = 'wss://wrj.shuixiongit.com/ws/chat?userId='
 
-const uid = ref('7')
-const peerUid = ref('8')
+const uid = ref('2')
+const peerUid = ref('3')
 
 const connected = ref(false)
 const state = ref('idle') // idle | calling | ringing | in-call
@@ -117,7 +117,14 @@
 
 function createPC() {
 	pc = new RTCPeerConnection({
-		iceServers: [{ urls: 'stun:stun.l.google.com:19302' }],
+		iceServers: [{ urls: 'stun:stun.l.google.com:19302' },
+			{ urls: 'stun:stun.l.google.com:19302' },
+			{ urls: 'stun:stun1.l.google.com:19302' },
+			{ urls: 'stun:stun.stunprotocol.org:3478' },
+			// 添加多个公共TURN服务器以提高跨网络连接成功率
+			{ urls: ['turn:freeturn.net:80', 'turn:freeturn.net:443'], username: 'free', credential: 'free' },
+			// 备用TURN服务器
+			{ urls: 'turn:turn.cloudlifter.io:443', username: 'webrtc', credential: 'webrtc' }],
 	})
 
 	pc.onicecandidate = (e) => {

--
Gitblit v1.9.3