2021-06-11 11:29:36 +02:00
|
|
|
<script lang="typescript">
|
2021-06-17 10:07:15 +02:00
|
|
|
import type {ScreenSharingLocalMedia} from "../../Stores/ScreenSharingStore";
|
2021-06-15 14:45:01 +02:00
|
|
|
import {videoFocusStore} from "../../Stores/VideoFocusStore";
|
2021-06-21 14:07:03 +02:00
|
|
|
import {srcObject} from "./utils";
|
2021-06-11 11:29:36 +02:00
|
|
|
|
2021-06-14 17:59:50 +02:00
|
|
|
export let peer : ScreenSharingLocalMedia;
|
2021-06-17 10:07:15 +02:00
|
|
|
let stream = peer.stream;
|
2021-06-11 11:29:36 +02:00
|
|
|
export let cssClass : string|undefined;
|
|
|
|
</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-06-15 14:45:01 +02:00
|
|
|
<video use:srcObject={stream} autoplay muted playsinline on:click={() => videoFocusStore.toggleFocus(peer)}></video>
|
2021-06-17 10:07:15 +02:00
|
|
|
{/if}
|
2021-06-11 11:29:36 +02:00
|
|
|
</div>
|