From 33b641530be229733ea8bac65a3c8b05bc5a6019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 26 Apr 2023 14:32:47 +0200 Subject: [PATCH] Fixing setInterval not cleared on microphone state Because of a bug in Svelte (see https://github.com/sveltejs/svelte/issues/5268), the onDestroy callback of sub-components are not called if one of the parent components has a transition. This in turn caused stores to not be unsubscribed, and ultimately, a "setInterval" to read the microphone audio level not to be cleared. We fix this by removing any Svelte based transitions/animations. --- .../EmbedScreens/CamerasContainer.svelte | 4 +-- .../front/Components/Video/MediaBox.svelte | 34 ++----------------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/play/src/front/Components/EmbedScreens/CamerasContainer.svelte b/play/src/front/Components/EmbedScreens/CamerasContainer.svelte index 738209074f..8ce4a211f5 100644 --- a/play/src/front/Components/EmbedScreens/CamerasContainer.svelte +++ b/play/src/front/Components/EmbedScreens/CamerasContainer.svelte @@ -2,14 +2,14 @@ import type { EmbedScreen } from "../../Stores/EmbedScreensStore"; import { streamableCollectionStore } from "../../Stores/StreamableCollectionStore"; import MediaBox from "../Video/MediaBox.svelte"; - import { fly, fade } from "svelte/transition"; + import { fly } from "svelte/transition"; export let highlightedEmbedScreen: EmbedScreen | undefined; export let full = false; $: clickable = !full; -