I installed use-sound,
const [ play ] = useSound(sound, {interrupt: true})
then I want to play a sound when theres a data change
useEffect(() => {
if (prevData.length < newData.length) {
play()
}
}, [ prevData,newData ])
It's pretty strange cause sometimes it works.. More often locally than online..
Actually i'd like to play the sound even if the window is not in focus. And in this case, again sometimes it works..
But I can't figure why this is not stable since the setup is pretty simple.