2021-06-21 14:43:10 +02:00
|
|
|
<script lang="ts">
|
2021-12-06 16:12:37 +01:00
|
|
|
import { VideoPeer } from "../../WebRtc/VideoPeer";
|
2021-06-21 14:43:10 +02:00
|
|
|
import VideoMediaBox from "./VideoMediaBox.svelte";
|
|
|
|
import ScreenSharingMediaBox from "./ScreenSharingMediaBox.svelte";
|
2021-12-06 16:12:37 +01:00
|
|
|
import { ScreenSharingPeer } from "../../WebRtc/ScreenSharingPeer";
|
2021-06-21 14:43:10 +02:00
|
|
|
import LocalStreamMediaBox from "./LocalStreamMediaBox.svelte";
|
2021-12-06 16:12:37 +01:00
|
|
|
import type { Streamable } from "../../Stores/StreamableCollectionStore";
|
2021-06-21 14:43:10 +02:00
|
|
|
|
|
|
|
export let streamable: Streamable;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="media-container">
|
|
|
|
{#if streamable instanceof VideoPeer}
|
2021-12-06 16:12:37 +01:00
|
|
|
<VideoMediaBox peer={streamable} />
|
2021-06-21 14:43:10 +02:00
|
|
|
{:else if streamable instanceof ScreenSharingPeer}
|
2021-12-06 16:12:37 +01:00
|
|
|
<ScreenSharingMediaBox peer={streamable} />
|
2021-06-21 14:43:10 +02:00
|
|
|
{:else}
|
2021-12-06 16:12:37 +01:00
|
|
|
<LocalStreamMediaBox peer={streamable} cssClass="" />
|
2021-06-21 14:43:10 +02:00
|
|
|
{/if}
|
|
|
|
</div>
|