summaryrefslogtreecommitdiff
path: root/client-web/source/index.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-09 14:08:20 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-09 14:08:20 +0200
commitd101fb7f77822aac2a3d42ca1529028405cfad0d (patch)
treea1603a025a06ef1efa30828d4a669684095ef50b /client-web/source/index.ts
parente8ba73eaef223513b143323df6cc7f495838a6ab (diff)
downloadkeks-meet-d101fb7f77822aac2a3d42ca1529028405cfad0d.tar
keks-meet-d101fb7f77822aac2a3d42ca1529028405cfad0d.tar.bz2
keks-meet-d101fb7f77822aac2a3d42ca1529028405cfad0d.tar.zst
refactor ui layout
Diffstat (limited to 'client-web/source/index.ts')
-rw-r--r--client-web/source/index.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/client-web/source/index.ts b/client-web/source/index.ts
index 22b2baf..502ab98 100644
--- a/client-web/source/index.ts
+++ b/client-web/source/index.ts
@@ -1,11 +1,16 @@
/// <reference lib="dom" />
+import { ediv } from "./helper.ts";
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 = {
+
+export const BOTTOM_CONTAINER = ediv({ class: ["bottom-container"] })
+export const ROOM_CONTAINER = ediv({ class: ["room"] })
+
+export const RTC_CONFIG: RTCConfiguration = {
// google stun!?
iceServers: [{ urls: ["stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19302"] }],
iceCandidatePoolSize: 10,
@@ -24,7 +29,7 @@ export async function main() {
const room_name = window.location.hash.substring(1)
if (room_name.length == 0) window.location.href = "/" // send them back to the start page
const conn = await (new SignalingConnection().connect(room_name))
- const room = new Room(conn)
+ new Room(conn)
create_menu()
- document.body.append(room.el)
+ document.body.append(ROOM_CONTAINER, BOTTOM_CONTAINER)
}