audio load

Signed-off-by: ale <ale@manalejandro.com>
This commit is contained in:
ale 2025-05-20 02:06:48 +02:00
parent c17e7f9ef8
commit 570933b1ec
Signed by: ale
GPG Key ID: 244A9C4DAB1C0C81

View File

@ -76,7 +76,7 @@ const App = () => {
} }
}) })
} else if (!json?.media && bounce.search('Now Playing: null') === -1) { } else if (!json?.media && bounce.search('Now Playing: null') === -1) {
setLink('#') setLink('')
setTitle('Stream Radio') setTitle('Stream Radio')
setBounce('Now Playing: null') setBounce('Now Playing: null')
} }
@ -91,7 +91,7 @@ const App = () => {
loadListeners() loadListeners()
}, (Math.floor(Math.random() * 20) + 10) * 1000) }, (Math.floor(Math.random() * 20) + 10) * 1000)
return () => clearInterval(inter) return () => clearInterval(inter)
}, [audioElmRef.current]) }, [])
useEffect(() => { useEffect(() => {
if (audioElmRef.current && audioElmRef.current.volume !== currentVolume && currentVolume >= 0 && currentVolume <= 1) { if (audioElmRef.current && audioElmRef.current.volume !== currentVolume && currentVolume >= 0 && currentVolume <= 1) {
audioElmRef.current.volume = currentVolume audioElmRef.current.volume = currentVolume