This commit is contained in:
David Luzar 2025-04-19 00:23:57 +00:00 committed by GitHub
commit d4badb1476
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -39,9 +39,17 @@ class Portal {
this.roomId = id;
this.roomKey = key;
this.socket.on("connect", () => {
console.log("connect");
});
console.log("subbing to init-room");
// Initialize socket listeners
this.socket.on("init-room", () => {
console.log("init-room (1)");
if (this.socket) {
console.log("init-room (2)");
this.socket.emit("join-room", this.roomId);
trackEvent("share", "room joined");
}
@ -54,6 +62,7 @@ class Portal {
);
});
this.socket.on("room-user-change", (clients: SocketId[]) => {
console.log("room-user-change", clients);
this.collab.setCollaborators(clients);
});