Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Play method are being calling itself repeatedly after numerous calls #811

Open
2 of 6 tasks
shubhammalvedev opened this issue Dec 16, 2022 · 1 comment
Open
2 of 6 tasks
Labels

Comments

@shubhammalvedev
Copy link

shubhammalvedev commented Dec 16, 2022

🪲 Description

🪲 What is the observed behavior?
Playing some audio files 1 by 1 after playing 8-10 files .play method is calling itself repeatedly.

🪲 What is the expected behavior?
should play audios 1 after another after successfully played previous audio. i tried this scenario by using setintervals but was not reliable.

🪲 Please post your code:

soundFile.play((success:any)=>{
        console.log('#527 after playing sound success-------->',success);
        
        if(success){
          this.setState({songCounter:this.state.songCounter+1, isPlaying:true})
        setTimeout(() => {
          this.loadSound('load')
          console.log('#526 loadsound called');
        }, 100);}
      })

💡 Does the problem have a test case?

💡 Possible solution

💡 Is there a workaround?

💡 If the bug is confirmed, would you be willing to create a pull request?

Is your issue with...

  • iOS
  • Android
  • Windows

Are you using...

  • React Native CLI (e.g. react-native run-android)
  • Expo
  • Other: (please specify)

Which versions are you using?

  • React Native Sound:
  • React Native:reflected
  • iOS: n/a
  • Android: reflected
  • Windows:n/a

Does the problem occur on...

  • [. ] Simulator
  • [ .] Device

If your problem is happening on a device, which device?

  • Device:samsung m42, android emulator
@BraveEvidence
Copy link

This will help https://www.youtube.com/watch?v=vVI7ZAZq5e0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants