Inconsistent callback interface issue while adding `isPlaying()` interface
Our team recently is working on adding isPlaying() function by having _isPlaying global variable in JS side. However, we encountered an issue.
-
play()hasonEndcallback which is fired after playback. -
pauseandstop()accepts a callback function which is fired immediately after the order has been processed.
This means that play() does not have the same callback interface as pause() and stop() for its first parameter, which hinders us to decide when to manipulate _isPlayingvariable. Our team wants to make the_isPlayingvariable true after the actual native logic process theplayorder. In case of Android, this would beplayer.start();`.
If we add a second callback parameter for play(onEnd, callback), would it be accepted for a pull request? We are using react-native-sound heavily on our production code, so we really want to add this function for better timing control of this library.