修改websdk 拉流问题

This commit is contained in:
jiegeaiai 2025-02-15 22:56:04 +08:00
parent 198f90115b
commit 1ecf914d66
2 changed files with 7 additions and 1 deletions

View File

@ -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}`);

View File

@ -1844,6 +1844,7 @@ function start() {
connect();
}
updateKickButton(0);
}