aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source/index.ts')
-rw-r--r--client-web/source/index.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/client-web/source/index.ts b/client-web/source/index.ts
index 670cb46..21bf4b8 100644
--- a/client-web/source/index.ts
+++ b/client-web/source/index.ts
@@ -2,6 +2,7 @@
import { log } from "./logger.ts"
import { create_menu } from "./menu.ts";
+import { SignalingConnection } from "./protocol/mod.ts";
import { Room } from "./room.ts"
export const servers: RTCConfiguration = {
@@ -17,11 +18,12 @@ export interface User {
window.onload = () => main()
-export function main() {
+export async function main() {
document.body.querySelector("p")?.remove()
log("*", "starting up")
const room_name = window.location.pathname.substring("/".length)
- const room = new Room(room_name)
+ const conn = await (new SignalingConnection().connect(room_name))
+ const room = new Room(conn)
create_menu()
document.body.append(room.el)
}