Open IsmaelMiber opened 5 years ago
Hi! Could you fill out the issue template, please?
Hi! Could you fill out the issue template, please?
Done, sorry for that.
Can you explain what is happening? If you remove the try blocks are any errors thrown?
Can you explain what is happening? If you remove the try blocks are any errors thrown?
when i click to play sound for first time it played will. then i click to pause it paused but when i click again to resume sound, the sound didn't resume it just no sound played.
there is no any error thrown.
What is the solution?
I used a workaround for this issue. When pausing get the current time and set it to state like
// pause sound whoosh.getCurrentTime((seconds) => this.setcuruntPlayTime(seconds) ); whoosh.pause();
setcuruntPlayTime(time) { this.setState({ curuntPlayTime:time }, () => { }) }
then seek the audio object when resuming, like..
async resume (){ if(!_.isEmpty(whoosh)){ // if whoosh empty, app get crashed whoosh.setCurrentTime(this.state.curuntPlayTime); whoosh.play(); } }
Still not working @asiriPiyajanaka I used
whoosh.setCurrentTime(this.state.curuntPlayTime);
whoosh.play((success)=> {
console.log("Hello", success);
});
then after success callback of play came and still, audio is not completed.
any solution here? thanks
What worked for me is,
SoundPlayer.playUrl(url);
SoundPlayer.seek(time);
I have issue with resume sound after pausing it.
I want to make play pause resume sound.
:beetle: The code:
:bulb: Possible solution
Is your issue with...
Are you using...
react-native run-android
)Which versions are you using?
Does the problem occur on...
If your problem is happening on a device, which device?