From 8b11f29a5e83a8bd6d9111e7b2d871eaab5536eb Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 27 Apr 2024 20:22:56 +0200 Subject: prototype stream previews --- client-web/source/user/local.ts | 1 + client-web/source/user/remote.ts | 2 ++ 2 files changed, 3 insertions(+) (limited to 'client-web/source/user') diff --git a/client-web/source/user/local.ts b/client-web/source/user/local.ts index a90a6f2..88e0852 100644 --- a/client-web/source/user/local.ts +++ b/client-web/source/user/local.ts @@ -64,6 +64,7 @@ export class LocalUser extends User { this.el.append(r.el) this.room.signaling.send_relay({ provide }) + if (r.set_room) r.set_room(this.room) r.set_destroy(() => { r.destroy() this.el.removeChild(r.el); diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts index ad891bd..1b46b91 100644 --- a/client-web/source/user/remote.ts +++ b/client-web/source/user/remote.ts @@ -92,6 +92,8 @@ export class RemoteUser extends User { if (PREFS.notify_join) notify(PO.join_message(this.display_name).join("")) this.room.chat.add_control_message({ join: this }) } + if (message.preview) + this.resources.get(message.preview.id)?.on_preview(message.preview.data) if (message.provide) { const d = new_remote_resource(this, message.provide) if (!d) return -- cgit v1.2.3-70-g09d2