From 6f8cf281050d4c5c4e4b3577585ad953f2cc518c Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 18 Oct 2024 17:45:07 +0200 Subject: [PATCH] bugfixing audio sound of options flow page --- src/routes/options-flow/+page.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/options-flow/+page.svelte b/src/routes/options-flow/+page.svelte index cca4eccb..a40d65f0 100644 --- a/src/routes/options-flow/+page.svelte +++ b/src/routes/options-flow/+page.svelte @@ -316,7 +316,7 @@ let rawData = data?.getOptionsFlowFeed?.filter(item => let highestOpenInterestTicker; let audio; - let muted = true; + let muted = false; let newIncomingData = false; let previousCallVolume = 0; //This is needed to play the sound only if it changes. let notFound = false; @@ -431,15 +431,20 @@ async function websocketRealtimeData() { if(newData?.length > rawData?.length) { rawData = newData; displayedData = rawData; + audio?.play(); } } if (ruleOfList?.length !== 0 || filterQuery?.length !== 0) { shouldLoadWorker.set(true); } + + /* if (previousCallVolume !== displayCallVolume && !muted && audio) { audio?.play(); } + */ + } catch (e) { console.error('Error processing WebSocket message:', e); }