From c7226f2f2eff957b17c533a4b3acdbacf8055588 Mon Sep 17 00:00:00 2001 From: bingochaos <523834173@qq.com> Date: Thu, 28 Aug 2025 22:56:20 +0800 Subject: [PATCH] update rtc_config --- dist/assets/index-legacy.js | 2 +- dist/assets/index.js | 2 +- src/store/index.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dist/assets/index-legacy.js b/dist/assets/index-legacy.js index 282d364..3d9ea81 100644 --- a/dist/assets/index-legacy.js +++ b/dist/assets/index-legacy.js @@ -86026,7 +86026,7 @@ } return ( (e.chatRecords = []), - (e.peerConnection = new RTCPeerConnection()), + (e.peerConnection = new RTCPeerConnection(e.rtcConfig)), e.peerConnection.addEventListener( 'connectionstatechange', (function () { diff --git a/dist/assets/index.js b/dist/assets/index.js index 0889f52..964c36b 100644 --- a/dist/assets/index.js +++ b/dist/assets/index.js @@ -66214,7 +66214,7 @@ const ba = i5('visionStore', { const n = ba() this.streamState === 'closed' ? ((this.chatRecords = []), - (this.peerConnection = new RTCPeerConnection()), + (this.peerConnection = new RTCPeerConnection(this.rtcConfig)), this.peerConnection.addEventListener('connectionstatechange', async (t) => { switch (this.peerConnection.connectionState) { case 'connected': diff --git a/src/store/index.ts b/src/store/index.ts index c2d12c4..592ced9 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -301,7 +301,7 @@ export const useVideoChatStore = defineStore('videoChatStore', { const visionState = useVisionStore() if (this.streamState === 'closed') { this.chatRecords = [] - this.peerConnection = new RTCPeerConnection() // TODO RTC_configuration + this.peerConnection = new RTCPeerConnection(this.rtcConfig) this.peerConnection.addEventListener('connectionstatechange', async (event) => { switch (this.peerConnection!.connectionState) { case 'connected': @@ -321,7 +321,6 @@ export const useVideoChatStore = defineStore('videoChatStore', { .then(([dataChannel, webRTCId]) => { this.streamState = StreamState.open this.webRTCId = webRTCId as string - // TODO GS this.chatDataChannel = dataChannel as any if (this.avatarType && this.avatarWSRoute) {