From 0c92fd00fae033a2aa04bb65b2d32bd2c8f9fd4a Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 04 Feb 2026 15:48:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
applications/drone-command/src/views/audioCall.vue | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/applications/drone-command/src/views/audioCall.vue b/applications/drone-command/src/views/audioCall.vue
index 9957564..90910ac 100644
--- a/applications/drone-command/src/views/audioCall.vue
+++ b/applications/drone-command/src/views/audioCall.vue
@@ -36,7 +36,7 @@
import { ref, computed, onBeforeUnmount } from 'vue'
/** ✅ 你的 WS 地址前缀(后面拼 userId) */
-const WS_BASE = 'wss://wrj.shuixiongit.com/ws/chat?userId='
+const WS_BASE = 'wss://域名/ws/chat?userId='
const uid = ref('2')
const peerUid = ref('3')
@@ -64,13 +64,11 @@
const s = String(seconds.value % 60).padStart(2, '0')
return `${m}:${s}`
})
-
function startTimer() {
stopTimer()
seconds.value = 0
timer = setInterval(() => seconds.value++, 1000)
}
-
function stopTimer() {
if (timer) clearInterval(timer)
timer = null
@@ -78,7 +76,6 @@
// 心跳
let pingTimer = null
-
function startPing() {
stopPing()
// 每 25 秒发一次 ping(你后端有 PING/PONG)
@@ -86,7 +83,6 @@
if (connected.value) send('ping', 'system', null)
}, 25000)
}
-
function stopPing() {
if (pingTimer) clearInterval(pingTimer)
pingTimer = null
@@ -135,8 +131,7 @@
const stream = e.streams[0]
if (remoteAudio.value) {
remoteAudio.value.srcObject = stream
- remoteAudio.value.play().catch(() => {
- })
+ remoteAudio.value.play().catch(() => {})
}
}
@@ -411,8 +406,7 @@
function cleanup(sendToPeer) {
try {
if (sendToPeer) send('hangup', peerUid.value, null)
- } catch {
- }
+ } catch {}
stopTimer()
--
Gitblit v1.9.3