react-native-audio-recorder-player icon indicating copy to clipboard operation
react-native-audio-recorder-player copied to clipboard

how to have a isPlaying status like ?

Open jeremy-habit opened this issue 2 years ago • 2 comments

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

Steps to reproduce the behabior

jeremy-habit avatar Aug 03 '21 09:08 jeremy-habit

Yeah looks like a race condition. I am not currently sure how to make this perfectly.

hyochan avatar Aug 12 '21 14:08 hyochan

same here, after i pause the player, a last event of play is being sent back on ios.

efstathiosntonas avatar Aug 24 '21 08:08 efstathiosntonas