diff options
author | metamuffin <metamuffin@disroot.org> | 2022-09-08 13:31:18 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-09-08 13:31:18 +0200 |
commit | cd255848196da0d8732d31049cc0f98388205a30 (patch) | |
tree | 3813003cc153210d24a7819c0dce8d68b26867a2 /client-web/source/room.ts | |
parent | 88241946e3144fede5c86f98d00bb723c1cc2761 (diff) | |
download | keks-meet-cd255848196da0d8732d31049cc0f98388205a30.tar keks-meet-cd255848196da0d8732d31049cc0f98388205a30.tar.bz2 keks-meet-cd255848196da0d8732d31049cc0f98388205a30.tar.zst |
more code
Diffstat (limited to 'client-web/source/room.ts')
-rw-r--r-- | client-web/source/room.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client-web/source/room.ts b/client-web/source/room.ts index 3ed7ddf..af85044 100644 --- a/client-web/source/room.ts +++ b/client-web/source/room.ts @@ -4,7 +4,6 @@ import { log } from "./logger.ts"; import { RemoteUser } from "./remote_user.ts"; import { User } from "./user.ts"; import { LocalUser } from "./local_user.ts"; -import { hex_id, parameter_string } from "./helper.ts"; import { ServerboundPacket, ClientboundPacket } from "../../common/packets.d.ts"; @@ -20,7 +19,7 @@ export class Room { this.name = name this.el = document.createElement("div") this.el.classList.add("room") - this.websocket = new WebSocket(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.host}/signaling/${encodeURIComponent(name)}`) + this.websocket = new WebSocket(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.host}/${encodeURIComponent(name)}/signaling`) this.websocket.onclose = () => this.websocket_close() this.websocket.onopen = () => this.websocket_open() this.websocket.onmessage = (ev) => { @@ -70,7 +69,6 @@ export class Room { } websocket_open() { log("ws", "websocket opened"); - this.websocket.send(this.local_user.name) - setInterval(() => this.websocket_send({}), 30000) // stupid workaround for nginx disconnection inactive connections + setInterval(() => this.websocket_send({ ping: null }), 30000) // stupid workaround for nginx disconnecting inactive connections } }
\ No newline at end of file |