This commit is contained in:
Hanusiak Piotr
2022-02-08 11:54:18 +01:00
parent 6f7bdf8fe4
commit d6f0c19838
6 changed files with 40 additions and 65 deletions
@@ -11,7 +11,7 @@
import type { Streamable } from "../../Stores/StreamableCollectionStore";
import Woka from "../Woka/Woka.svelte";
import { onDestroy, onMount } from "svelte";
import { onMount } from "svelte";
import { isMediaBreakpointOnly } from "../../Utils/BreakpointsUtils";
export let clickable = false;
@@ -30,11 +30,6 @@
let embedScreen: EmbedScreen;
let videoContainer: HTMLDivElement;
let minimized = isMediaBreakpointOnly("md");
let volume = 0;
const unsubscribe = volumeStore.subscribe((value) => {
volume = value ?? 0;
});
if (peer) {
embedScreen = {
@@ -54,10 +49,6 @@
onMount(() => {
resizeObserver.observe(videoContainer);
});
onDestroy(() => {
unsubscribe();
});
</script>
<div
@@ -103,7 +94,7 @@
/>
<img src={blockSignImg} draggable="false" on:dragstart|preventDefault={noDrag} class="block-logo" alt="Block" />
{#if $constraintStore && $constraintStore.audio !== false}
<SoundMeterWidget {volume} />
<SoundMeterWidget volume={$volumeStore} />
{/if}
</div>