diff --git a/transport/websocket.ts b/transport/websocket.ts index aee494a..656a088 100644 --- a/transport/websocket.ts +++ b/transport/websocket.ts @@ -203,7 +203,8 @@ export class WebSocketManager { if (baseUrl) { return baseUrl; } - return `ws://${window.location.host}${liveUrl}`; + const wsScheme = window.location.protocol === "https:" ? "wss:" : "ws:"; + return `${wsScheme}//${window.location.host}${liveUrl}`; } private getLiveUrl(): string {