zmxv / react-native-sound

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

Typescript declaration is wrong for .play() method #750

Open bezenson opened 2 years ago

bezenson commented 2 years ago

It says that onEnd function is unnecessary: play(onEnd?: (success: boolean) => void): this

But for iOS we should define it: yourSound.play(() => {});

Otherwise we getting RNSound.play must not be null error. Described in issue https://github.com/zmxv/react-native-sound/issues/746

Rmannn commented 2 years ago

Same problem here

shubhamkhuva commented 2 years ago

same problem

xaiamov commented 2 years ago

Got the error. Thanks for the solution.