From 7b94ac644dde09005c6058e2cee4ccfc4738a68a Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Fri, 26 Nov 2021 23:30:21 +0100 Subject: [PATCH] working woka picture if no camera view is provided --- .../src/Components/Video/VideoMediaBox.svelte | 53 ++++++++++++++----- front/src/Stores/UserWokaPictureStore.ts | 3 +- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/front/src/Components/Video/VideoMediaBox.svelte b/front/src/Components/Video/VideoMediaBox.svelte index cc7fb424..46554128 100644 --- a/front/src/Components/Video/VideoMediaBox.svelte +++ b/front/src/Components/Video/VideoMediaBox.svelte @@ -1,12 +1,14 @@
- {#if $statusStore === 'connecting'} -
+ {#if $statusStore === "connecting"} +
{/if} - {#if $statusStore === 'error'} -
+ {#if $statusStore === "error"} +
{/if} {#if !$constraintStore || $constraintStore.video === false} - {name} + + {#if !userWokaPictureSrc} + {name} + {:else} + player avatar + {/if} + {/if} {#if $constraintStore && $constraintStore.audio === false} - Muted + Muted {/if} - +
+ \ No newline at end of file diff --git a/front/src/Stores/UserWokaPictureStore.ts b/front/src/Stores/UserWokaPictureStore.ts index de3f759a..6ce7ba7d 100644 --- a/front/src/Stores/UserWokaPictureStore.ts +++ b/front/src/Stores/UserWokaPictureStore.ts @@ -5,12 +5,13 @@ import type { RoomConnection } from "../Connexion/RoomConnection"; * A store that contains the players avatars pictures */ function createUserWokaPictureStore() { - let players = new Map(); + const players = new Map(); const { subscribe, update } = writable(players); return { subscribe, + // P.H. NOTE: Not clearing the store after reconnecting to the room - is this a problem? connectToRoomConnection: (roomConnection: RoomConnection) => { roomConnection.onUserLeft((userId) => { update((users) => {