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

currentPosition jumps back to start occasionally on Android

Open andreiZi opened this issue 2 years ago • 2 comments

Please fill the template to help you out. Also, please try the Example project compare before submiting the issue when you have certain issue with your project setup.

Version of react-native-audio-recorder-player

3.5.1

Version of React Native

0.70.5

Version of Android

Android Tiramisu

Device

Pixel 3a

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

the recording should play without jumping back randomly to the beginning

Actual behavior

When playing voice recordings on android, the current position occasionally jumps back.

You can see in the log that the audio player jumps to the start at 4460 ms in the first voice record and in the second at 4707 ms.

Example: Untitled

Code:

  1. This first log is only printed once as the player gets instantiated one once (wanted to make sure that I don't have two audio players)

  2. Logs the current position / duration of the voice recording. image

This behavior occurs only on android. The same code works on iOS fine and was thoroughly tested.

Also, sometimes the app crashes with the following error message. I included it here, because I assume that both of the anomalies may be related. image

andreiZi avatar Dec 19 '22 17:12 andreiZi

@andreiZi try on a real device. I'am using a Samsung S10 (Android 12) without problems.

claudiozam avatar Jan 11 '23 22:01 claudiozam

Thank you @claudiozam for your help.

I went out and purchased a physical Pixel 7 Pro and it works well now. It would be great if the issue could be resolved for future reference, as it caused a lot of frustration when trying to find the cause on an emulator.

andreiZi avatar Jan 19 '23 11:01 andreiZi