zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.78k stars 748 forks source link

success callback in .play() doesn't work on Android. #734

Open kostiantyn-solianyk opened 3 years ago

kostiantyn-solianyk commented 3 years ago

:beetle: Description .play() with success callback doesn't work on Android. On IOS works as expected.

The callback doesn’t trigger after the sound was played.

:beetle: What is the observed behavior?

:beetle: What is the expected behavior?

:beetle: Please post your code:

sound.play((success) => {
    console.log('success', success); // doesn't work on android but works on IOS
});

: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...

Which versions are you using?

Does the problem occur on...

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

FoundersApproach commented 2 years ago

Hello, Yes, Issue is there. In android, suppose sound is playing and when app goes in background success callback in play method is not called.