Closed edgargrs closed 3 years ago
After test another playback libraries, and a little research I realized that the problem was with the MP3s. it seems that the MP3 files are not inherently seekable.
https://stackoverflow.com/questions/53742145/precise-seek-in-mp3-files-on-android
I solved this problem by changing the MP3 for M4A format.
Describe the bug First of all, thanks for this amazing library. 🙌
This only happens on android. iOS works well. If I use tracks longer than one hour the position exceeds the duration and the duration and position returned are inconsistent. I realized that if I started the track from beginning and let it run until the end this not happen. Only when I seek to a new position. It's very strange, if I seek to (seekTo) closer to the end, the difference is less than if I seek to a position less close to the end of the track. I'm testing with 7 different tracks loaded from network and in some cases the duration and position are inconsistent. I'm adding the duration in the track object
add([]).
Also my audios have 44.1 kHz of sample rate and they are MP3 files. I changed the build preferences for the app using many values intrack-player.json
Results of my test:
To Reproduce I create a repository to reproduce the issue 👉 https://gitlab.com/edgargrs/rntrackaudioplayerexample
Environment:
What
react-native-track-player
version are you using? This happens on the plugin version: v2.0.0-rc18 and v1.2.7In master branch I'm using v2.0.0-rc18 I created another branch with the version v1.2.7 and the same happens. v2.0.0-rc18 👉 https://gitlab.com/edgargrs/rntrackaudioplayerexample v1.2.7 👉 https://gitlab.com/edgargrs/rntrackaudioplayerexample/-/tree/v1.2.7
Probably related issues 983 963 860 629 228