blob: 6266affdf36cc7bfccd5d51230d4b9d4094f4ab3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/// <reference lib="dom" />
import { get_query_params } from "./helper.ts"
import { log } from "./logger.ts"
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,
}
export interface User {
peer: RTCPeerConnection
stream: MediaStream,
}
export const parameters = get_query_params()
window.onload = () => main()
export function main() {
document.body.querySelector("p")?.remove()
log("*", "starting up")
const room_name = window.location.pathname.substring("/".length)
const room = new Room(room_name)
create_menu(room)
document.body.append(room.el)
}
|