Fixing warnings and moving biggest area compute in store
This commit is contained in:
parent
d3544e2d97
commit
d533894a74
11 changed files with 180 additions and 106 deletions
|
@ -1,11 +1,11 @@
|
|||
<script lang="typescript">
|
||||
import {ScreenSharingLocalMedia} from "../../Stores/ScreenSharingStore";
|
||||
import type {ScreenSharingLocalMedia} from "../../Stores/ScreenSharingStore";
|
||||
import {videoFocusStore} from "../../Stores/VideoFocusStore";
|
||||
|
||||
function srcObject(node, stream) {
|
||||
function srcObject(node: HTMLVideoElement, stream: MediaStream) {
|
||||
node.srcObject = stream;
|
||||
return {
|
||||
update(newStream) {
|
||||
update(newStream: MediaStream) {
|
||||
if (node.srcObject != newStream) {
|
||||
node.srcObject = newStream
|
||||
}
|
||||
|
@ -14,11 +14,13 @@
|
|||
}
|
||||
|
||||
export let peer : ScreenSharingLocalMedia;
|
||||
let stream : MediaStream|undefined = peer.stream;
|
||||
let stream = peer.stream;
|
||||
export let cssClass : string|undefined;
|
||||
</script>
|
||||
|
||||
|
||||
<div class="video-container {cssClass ? cssClass : ''}" class:hide={!stream}>
|
||||
{#if stream}
|
||||
<video use:srcObject={stream} autoplay muted playsinline on:click={() => videoFocusStore.toggleFocus(peer)}></video>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue