React-native-track-player: Android seekTo playback error

Created on 25 May 2018  路  4Comments  路  Source: react-native-kit/react-native-track-player

Hello,
When I try to call TrackPlayer.seekTo(currentPosition + 10), the registerEventHandler fire a callback with this object:

{
  type: "playback-state",
  state: 6
}

and soon after it starts to fire these callbacks non-stop until the track finishes:

{
  type: "playback-error",
  error: "Unknown error"
}

This only happens in android, currently testing on a Nexus 5 emulator,
In iOS works normally, and these events are never called after I call seekTo there.

Thanks in advance,
Cheers

Most helpful comment

If you didn't went through the process of configuring this module, you're not using it.

The native Android player is really buggy, I plan to remove it in a future version.
You should try ExoPlayer instead, it's way faster and more consistent than the native player.
https://github.com/react-native-kit/react-native-track-player/wiki/Build-Preferences

All 4 comments

Which Android version are you testing on?

Are you using ExoPlayer?

Android 7.0 API 24,

I don't know if i'm using ExoPlayer, how can I check that in my project?

If you didn't went through the process of configuring this module, you're not using it.

The native Android player is really buggy, I plan to remove it in a future version.
You should try ExoPlayer instead, it's way faster and more consistent than the native player.
https://github.com/react-native-kit/react-native-track-player/wiki/Build-Preferences

Nice, it worked, thanks for the quick help!
Although, now when I call seekTo with any position the track go back to the beginning...
But this is another issue.

Thanks again,
Cheers!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mnlbox picture mnlbox  路  4Comments

simenJohnsen picture simenJohnsen  路  3Comments

RiccardoNL picture RiccardoNL  路  3Comments

EhteshamAnwar picture EhteshamAnwar  路  3Comments

tarahiw picture tarahiw  路  3Comments