Open scarlac opened 4 years ago
Same here: react-native: 0.61.5 react-native-sound: 0.11.0
I had to add a hacky solution, by start playing and pausing after mounting the player.
Same the issue
Also having this issue!
was there any solution to this issue?
@williamswebworks Sorry, I managed to work around it by manually stopping the sound.
:beetle: What is the observed behavior?
Using sound.setNumberOfLoops(1) causes sound to never stop playing.
:beetle: What is the expected behavior?
Using sound.setNumberOfLoops(1) should play the sound once, then loop once. A total of 2 plays.
:beetle: Please post your code:
:bulb: Does the problem have a test case?
I don't have a public test case. It's clear why the issue occurs though, because the looping is claimed as supported by android in README file but in code it clearly isn't.
Native code in rn-sound repo that clearly doesn't support number of loops:
However docs say:
:bulb: Possible solution
Fix and Merge PR that makes Android support loops, or update documentation.
:bulb: Is there a workaround?
No workaround possible.
:bulb: If the bug is confirmed, would you be willing to create a pull request?
One already exists.
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?