Open webyonet opened 3 years ago
I had a similar issue and thought it was a release mode vs not problem but it turns out that my local dev environment was using 0.11.0 and the build server did clean npm installs each time and installed 0.11.1. We have the same problem as you just running 0.11.1 at all. Going to revert to 0.11.0 for now.
Same thing happened to me, on iOS but not on Android and this patch fixed it for me.
diff --git a/node_modules/react-native-sound/sound.js b/node_modules/react-native-sound/sound.js
index 33e6157..3391b11 100644
--- a/node_modules/react-native-sound/sound.js
+++ b/node_modules/react-native-sound/sound.js
@@ -106,7 +106,7 @@ Sound.prototype.isLoaded = function() {
Sound.prototype.play = function(onEnd) {
if (this._loaded) {
- RNSound.play(this._key, onEnd ? (successfully) => onEnd(successfully) : null);
+ RNSound.play(this._key, (successfully) => onEnd && onEnd(successfully) );
} else {
onEnd && onEnd(false);
}
:beetle: Description
There is no problem in debug mode, but there is no sound in release mode (real device). There is no such problem with v0.11.0
:beetle: What is the observed behavior?
No sound
:beetle: What is the expected behavior?
sound playing
:beetle: Please post your code:
:bulb: Does the problem have a test case?
:bulb: **Possible solution**:bulb: Is there a workaround?
:bulb: If the bug is confirmed, would you be willing to create a pull request?
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?