2021-06-11 11:29:36 +02:00
|
|
|
<script lang="typescript">
|
2021-06-14 17:59:50 +02:00
|
|
|
import {ScreenSharingLocalMedia} from "../../Stores/ScreenSharingStore";
|
|
|
|
|
2021-06-11 11:29:36 +02:00
|
|
|
function srcObject(node, stream) {
|
|
|
|
node.srcObject = stream;
|
|
|
|
return {
|
|
|
|
update(newStream) {
|
|
|
|
if (node.srcObject != newStream) {
|
|
|
|
node.srcObject = newStream
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-14 17:59:50 +02:00
|
|
|
export let peer : ScreenSharingLocalMedia;
|
|
|
|
let stream : MediaStream|undefined = peer.stream;
|
2021-06-11 11:29:36 +02:00
|
|
|
export let cssClass : string|undefined;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="video-container {cssClass}" class:hide={!stream}>
|
2021-06-14 17:59:50 +02:00
|
|
|
<video class="myCamVideo" use:srcObject={stream} autoplay muted playsinline on:click={() => peer.importanceStore.toggle()}></video>
|
2021-06-11 11:29:36 +02:00
|
|
|
</div>
|