aboutsummaryrefslogtreecommitdiff
path: root/client-web/source
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-07 14:46:09 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-07 14:46:09 +0200
commit3ce9a53e272dc556222bca747461b3ec24796912 (patch)
tree3f0f780801cbb49ef797c361cf67b4709bacac42 /client-web/source
parent61950198e3bf06555f48e8f51c882a4c3cce5128 (diff)
downloadkeks-meet-3ce9a53e272dc556222bca747461b3ec24796912.tar
keks-meet-3ce9a53e272dc556222bca747461b3ec24796912.tar.bz2
keks-meet-3ce9a53e272dc556222bca747461b3ec24796912.tar.zst
start with the new server
Diffstat (limited to 'client-web/source')
-rw-r--r--client-web/source/index.ts35
1 files changed, 5 insertions, 30 deletions
diff --git a/client-web/source/index.ts b/client-web/source/index.ts
index fbb77d4..6266aff 100644
--- a/client-web/source/index.ts
+++ b/client-web/source/index.ts
@@ -6,6 +6,7 @@ import { create_menu } from "./menu.ts";
import { Room } from "./room.ts"
export const servers: RTCConfiguration = {
+ // google stun!?
iceServers: [{ urls: ["stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19302"] }],
iceCandidatePoolSize: 10,
}
@@ -22,34 +23,8 @@ window.onload = () => main()
export function main() {
document.body.querySelector("p")?.remove()
log("*", "starting up")
- if (window.location.pathname.startsWith("/room/")) {
- const room_name = window.location.pathname.substring("/room/".length)
- const room = new Room(room_name)
- create_menu(room)
- document.body.append(room.el)
- } else {
- create_menu()
- document.body.append(create_start_screen())
- }
-}
-
-function create_start_screen() {
- const with_text_content = (a: string) => (b: string) => {
- const e = document.createElement(a)
- e.textContent = b
- return e
- }
- const p = with_text_content("p")
- const h2 = with_text_content("h2")
-
- const el = document.createElement("div")
- el.append(
- h2("keks-meet"),
- p("A web conferencing application using webrtc"),
- p("keks-meet is free software! It is licenced under the terms of the third version of the GNU Affero General Public Licence only."),
- p("To get started, just enter a unique idenfier, click 'Join', then share the URL with your partner.")
- )
-
-
- return el
+ const room_name = window.location.pathname.substring("/".length)
+ const room = new Room(room_name)
+ create_menu(room)
+ document.body.append(room.el)
}