cr fixes #1
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
export let game: Game;
|
||||
let selectedCamera: string | undefined = undefined;
|
||||
let selectedMicrophone: string | undefined = undefined;
|
||||
let volume = 0;
|
||||
|
||||
const enableCameraScene = game.scene.getScene(EnableCameraSceneName) as EnableCameraScene;
|
||||
|
||||
@@ -61,12 +60,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
const unsubscribeLocalVolumeStore = localVolumeStore.subscribe((value) => {
|
||||
volume = value ?? 0;
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
unsubscribeLocalVolumeStore();
|
||||
unsubscribeLocalStreamStore();
|
||||
});
|
||||
|
||||
@@ -95,7 +89,7 @@
|
||||
<img class="background-img" src={cinemaCloseImg} alt="" />
|
||||
</div>
|
||||
{/if}
|
||||
<HorizontalSoundMeterWidget {volume} />
|
||||
<HorizontalSoundMeterWidget volume={$localVolumeStore} />
|
||||
|
||||
<section class="selectWebcamForm">
|
||||
{#if $cameraListStore.length > 1}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
import LL from "../i18n/i18n-svelte";
|
||||
|
||||
let stream: MediaStream | null;
|
||||
let volume = 0;
|
||||
|
||||
const unsubscribeLocalStreamStore = localStreamStore.subscribe((value) => {
|
||||
if (value.type === "success") {
|
||||
@@ -17,13 +16,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
const unsubscribeLocalVolumeStore = localVolumeStore.subscribe((value) => {
|
||||
volume = value ?? 0;
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
unsubscribeLocalStreamStore();
|
||||
unsubscribeLocalVolumeStore();
|
||||
});
|
||||
|
||||
let isSilent: boolean;
|
||||
@@ -59,7 +53,7 @@
|
||||
<div class="is-silent">{$LL.camera.my.silentZone()}</div>
|
||||
{:else if $localStreamStore.type === "success" && $localStreamStore.stream}
|
||||
<video class="my-cam-video" use:srcObject={stream} autoplay muted playsinline />
|
||||
<SoundMeterWidget {volume} />
|
||||
<SoundMeterWidget volume={$localVolumeStore} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user