You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have added audio in my cache directory and then played it creating a sound object with in a function like that const playAudio = () => { if (selectAudio) { const sound = new Sound(selectAudio, Sound.CACHES, (error) => { if (error) { console.log('Error loading audio file', error); return; } setSound(sound); sound.play(); }); } };
But now i have to stop the audio after certain time using sound.stop() from another function and it will not worked and even not call i think sound object not properly passed please help if i want to stop the sound from another function..please help
The text was updated successfully, but these errors were encountered:
Hello, I have added audio in my cache directory and then played it creating a sound object with in a function like that
const playAudio = () => { if (selectAudio) { const sound = new Sound(selectAudio, Sound.CACHES, (error) => { if (error) { console.log('Error loading audio file', error); return; } setSound(sound); sound.play(); }); } };
But now i have to stop the audio after certain time using
sound.stop()
from another function and it will not worked and even not call i think sound object not properly passed please help if i want to stop the sound from another function..please helpThe text was updated successfully, but these errors were encountered: