-
Notifications
You must be signed in to change notification settings - Fork 593
/
CamerasContainer.svelte
31 lines (28 loc) · 1.06 KB
/
CamerasContainer.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<script lang="ts">
import type { EmbedScreen } from "../../Stores/EmbedScreensStore";
import { streamableCollectionStore } from "../../Stores/StreamableCollectionStore";
import MediaBox from "../Video/MediaBox.svelte";
import { fly } from "svelte/transition";
export let highlightedEmbedScreen: EmbedScreen | undefined;
export let full = false;
$: clickable = !full;
</script>
<aside class="cameras-container" class:full in:fly|local={{ x: 200, duration: 100 }}>
<div class="other-cameras">
{#each [...$streamableCollectionStore.values()] as peer (peer.uniqueId)}
{#if !highlightedEmbedScreen || highlightedEmbedScreen.type !== "streamable" || (highlightedEmbedScreen.type === "streamable" && highlightedEmbedScreen.embed !== peer)}
<MediaBox streamable={peer} isClickable={clickable} />
{/if}
{/each}
</div>
</aside>
<style lang="scss">
.cameras-container {
&:first-child {
margin-top: 2%;
}
&.full {
flex: 0 0 100%;
}
}
</style>