mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 00:44:14 +00:00
fix: replace generator with static silent audio
This commit is contained in:
parent
4996cc893c
commit
af096077ae
2 changed files with 3 additions and 2 deletions
BIN
public/sounds/silence.mp3
Normal file
BIN
public/sounds/silence.mp3
Normal file
Binary file not shown.
|
|
@ -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);
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue