diff options
Diffstat (limited to 'client-web/source/index.ts')
-rw-r--r-- | client-web/source/index.ts | 11 |
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) } |