fix: replace generator with static silent audio

This commit is contained in:
MAZE 2025-07-12 00:50:47 +03:30
parent 4996cc893c
commit af096077ae
2 changed files with 3 additions and 2 deletions

BIN
public/sounds/silence.mp3 Normal file

Binary file not shown.

View file

@ -1,6 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { getSilenceDataURL } from '@/helpers/sound';
import { BrowserDetect } from '@/helpers/browser-detect';
import { useSoundStore } from '@/stores/sound';
@ -25,7 +24,9 @@ export function MediaSessionTrack() {
const generateSilence = useCallback(async () => {
if (!masterAudioSoundRef.current) return;
masterAudioSoundRef.current.src = await getSilenceDataURL();
masterAudioSoundRef.current.src = '/sounds/silence.mp3';
setIsGenerated(true);
}, []);