react-native-audio-recorder-player
react-native-audio-recorder-player copied to clipboard
how to have a isPlaying status like ?
Version of react-native-audio-recorder-player
3.1.0
Version of React Native
0.64.1
Platforms you faced the error (IOS or Android or both?)
ios
Expected behavior
do not receive a last event from playback listener after pause
Actual behavior
when i use onPausePlay, it's working BUT after pausing action i receive a last event from the playback listener. When i pause, i setState isplaying at false, and isPasued at true. But in the callback from playbacklisten i'm setting isPlaying at true, and isPaused at false. And if i received one event of playing after paused, then isPlaying is true even if i used onPausePlay.
![Capture d’écran 2021-08-03 à 11 56 50](https://user-images.githubusercontent.com/11737143/127997169-5b4bf83c-be8c-490e-9247-18578eaaa822.png)
Steps to reproduce the behabior
Yeah looks like a race condition. I am not currently sure how to make this perfectly.
same here, after i pause the player, a last event of play is being sent back on ios.