From 429dc2d5375abf8ca9c3861bdc4bdff52a31b0e4 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 10 Sep 2022 00:56:25 +0200 Subject: overlay rework + settings --- client-web/source/room.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client-web/source/room.ts') diff --git a/client-web/source/room.ts b/client-web/source/room.ts index 11a5000..207b40d 100644 --- a/client-web/source/room.ts +++ b/client-web/source/room.ts @@ -15,6 +15,8 @@ export class Room { public my_id!: number public chat: Chat = new Chat(this) + public on_ready = () => { }; + constructor(public signaling: SignalingConnection) { this.signaling.control_handler = (a) => this.control_handler(a) this.signaling.relay_handler = (a, b) => this.relay_handler(a, b) @@ -33,6 +35,7 @@ export class Room { log("*", `${p.id} joined`); if (p.id == this.my_id) { this.local_user = new LocalUser(this, p.id); + this.on_ready() } else { const ru = new RemoteUser(this, p.id) this.local_user.add_initial_to_remote(ru) -- cgit v1.2.3-70-g09d2