From 5cf5e0ce2bb176cc445f8d6b9f150ebf23589a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 15 Jun 2021 14:45:01 +0200 Subject: [PATCH] Changing the way we focus a video element. Now, only one video element can be important. --- .../Components/Video/LocalStreamMedia.svelte | 5 +- .../Video/ScreenSharingMedia.svelte | 3 +- front/src/Components/Video/VideoMedia.svelte | 11 +- .../src/Components/Video/VideoOverlay.svelte | 13 +- front/src/Phaser/Game/GameScene.ts | 2 + front/src/Stores/ImportanceStore.ts | 26 --- front/src/Stores/LayoutStore.ts | 20 +- front/src/Stores/ScreenSharingStore.ts | 3 - front/src/Stores/VideoFocusStore.ts | 48 +++++ front/src/WebRtc/ScreenSharingPeer.ts | 8 +- front/src/WebRtc/VideoPeer.ts | 7 +- front/style/style.scss | 176 +++++++++--------- 12 files changed, 164 insertions(+), 158 deletions(-) delete mode 100644 front/src/Stores/ImportanceStore.ts create mode 100644 front/src/Stores/VideoFocusStore.ts diff --git a/front/src/Components/Video/LocalStreamMedia.svelte b/front/src/Components/Video/LocalStreamMedia.svelte index 375612a6..37c59ec7 100644 --- a/front/src/Components/Video/LocalStreamMedia.svelte +++ b/front/src/Components/Video/LocalStreamMedia.svelte @@ -1,5 +1,6 @@ -
- +
+
diff --git a/front/src/Components/Video/ScreenSharingMedia.svelte b/front/src/Components/Video/ScreenSharingMedia.svelte index 0dbc3c16..01d43313 100644 --- a/front/src/Components/Video/ScreenSharingMedia.svelte +++ b/front/src/Components/Video/ScreenSharingMedia.svelte @@ -1,5 +1,6 @@
- {#each [...$layoutStore.get(DivImportance.Important).values()] as peer (peer.uniqueId)} - + {#each [...$layoutStore.values()] as peer (peer.uniqueId)} + {#if $videoFocusStore && peer === $videoFocusStore } + + {/if} {/each}