aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMetaMuffin <metamuffin@yandex.com>2021-08-06 14:52:39 +0200
committerMetaMuffin <metamuffin@yandex.com>2021-08-06 14:52:39 +0200
commit53c3512b70d5a6ae236e881fe31743bb79f82711 (patch)
treeb2dd87d92f0d7a74237b1bdc2089e6b8d3773714
parentff350d6c0ea1f3c12076349bd64b7df1318878ad (diff)
downloadkeks-meet-53c3512b70d5a6ae236e881fe31743bb79f82711.tar
keks-meet-53c3512b70d5a6ae236e881fe31743bb79f82711.tar.bz2
keks-meet-53c3512b70d5a6ae236e881fe31743bb79f82711.tar.zst
https -> wss
-rw-r--r--source/client/room.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/client/room.ts b/source/client/room.ts
index 1b750f2..93cfccf 100644
--- a/source/client/room.ts
+++ b/source/client/room.ts
@@ -19,7 +19,7 @@ export class Room {
this.name = name
this.el = document.createElement("div")
this.el.classList.add("room")
- this.websocket = new WebSocket(`ws://${window.location.host}/signaling/${encodeURIComponent(name)}`)
+ this.websocket = new WebSocket(`${window.location.protocol.endsWith("s") ? "wss" : "ws"}://${window.location.host}/signaling/${encodeURIComponent(name)}`)
this.websocket.onclose = () => this.websocket_close()
this.websocket.onopen = () => this.websocket_open()
this.websocket.onmessage = (ev) => {