From 1ecf914d66e5eebe63eff5019c38145da7ebc68b Mon Sep 17 00:00:00 2001 From: jiegeaiai Date: Sat, 15 Feb 2025 22:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9websdk=20=E6=8B=89=E6=B5=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/public/scripts/wewbRtcSDK.js | 7 ++++++- web/src/webrtc.js | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/public/scripts/wewbRtcSDK.js b/web/public/scripts/wewbRtcSDK.js index be1fe73..e82b40b 100644 --- a/web/public/scripts/wewbRtcSDK.js +++ b/web/public/scripts/wewbRtcSDK.js @@ -775,7 +775,12 @@ function connect() { return; } - ws = new WebSocket(window.location.href.replace('http://', 'ws://').replace('https://', 'wss://')); + // ws = new WebSocket(window.location.href.replace('http://', 'ws://').replace('https://', 'wss://')); + // ws = new WebSocket(window.location.href.replace('http://', 'ws://').replace('https://', 'wss://')); + let connectionUrl = window.location.href.replace('http://', 'ws://').replace('https://', 'wss://').replace(/:\d+/, ''); + console.log(`Creating a websocket connection to: ${connectionUrl}`); + ws = new WebSocket(connectionUrl); + ws.attemptStreamReconnection = true; ws.onmessage = function(event) { console.log(`<- SS: ${event.data}`); diff --git a/web/src/webrtc.js b/web/src/webrtc.js index 8942629..f5af971 100644 --- a/web/src/webrtc.js +++ b/web/src/webrtc.js @@ -1844,6 +1844,7 @@ function start() { connect(); } + updateKickButton(0); }