2021-06-11 11:29:36 +02:00
|
|
|
<script lang="typescript">
|
2021-12-06 16:12:37 +01:00
|
|
|
import type { ScreenSharingLocalMedia } from "../../Stores/ScreenSharingStore";
|
|
|
|
import { videoFocusStore } from "../../Stores/VideoFocusStore";
|
|
|
|
import { srcObject } from "./utils";
|
2021-06-11 11:29:36 +02:00
|
|
|
|
2021-12-06 16:12:37 +01:00
|
|
|
export let peer: ScreenSharingLocalMedia;
|
2021-06-17 10:07:15 +02:00
|
|
|
let stream = peer.stream;
|
2021-12-06 16:12:37 +01:00
|
|
|
export let cssClass: string | undefined;
|
2021-06-11 11:29:36 +02:00
|
|
|
</script>
|
|
|
|
|
2021-06-15 14:45:01 +02:00
|
|
|
<div class="video-container {cssClass ? cssClass : ''}" class:hide={!stream}>
|
2021-06-17 10:07:15 +02:00
|
|
|
{#if stream}
|
2021-12-06 16:12:37 +01:00
|
|
|
<video use:srcObject={stream} autoplay muted playsinline on:click={() => videoFocusStore.toggleFocus(peer)} />
|
2021-06-17 10:07:15 +02:00
|
|
|
{/if}
|
2021-06-11 11:29:36 +02:00
|
|
|
</div>
|