React-native-track-player: TrackPlayer.reset() doesn't set the track to null

Created on 11 Jan 2019  路  7Comments  路  Source: react-native-kit/react-native-track-player

Hello

I have a small bug which it not blocking but it looks like a bug.

When I call TrackPlayer.reset(), it should stop and remove the track.
When I call TrackPlayer.stop(), it should stop the track.

But actually reset() doesn't remove the track, so i have to set the track to null by myself.

Is it a bug ?

Android Bug

Most helpful comment

I can reproduce this on Android. iOS is fine. I didn't try on Windows.

All 7 comments

Which platform? iOS, Android or Windows?

I can reproduce this on Android. iOS is fine. I didn't try on Windows.

What do you mean by "set the track to null"?

Is it getCurrentTrack() that doesn't return null?
Is it the playback-track-changed that doesn't get fired?

  • What do you mean by "set the track to null"?
    Sorry I got lost in my redux abrastraction :)

  • Is it getCurrentTrack() that doesn't return null?
    This function return null actually

  • Is it the playback-track-changed that doesn't get fired?
    Indeed this event is not fired. And it's where I change my track in my redux.

So reset() set the track at null but doesn't fired playback-track-changed

As the reset() method actually set the track to null. It should trigger the playback-track-changed event to be consistent.

Let me know if 333ce49 fixes it for you.

@Guichaguri

It works! Good job !
Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moduval picture moduval  路  4Comments

RiccardoNL picture RiccardoNL  路  3Comments

b3rkaydem1r picture b3rkaydem1r  路  3Comments

sagargheewala picture sagargheewala  路  3Comments

moduval picture moduval  路  4Comments