react.native.track.player returns a state not defined in the documentation (idle)

63 Views Asked by At

After the react.native.track.player stopped playing an mp3 track, both getState and the state change listener both return "idle" which is not in the documentation. What is that? How do it get the player going again. It doesn't respond to play anymore!

Here is the listener function code: const playerStateChanged = (whatHappened) => { ... console.log("whatHappened", whatHappened.state);

Here is the getState code:

var currentState = await TrackPlayer.getState();
console.log("currentState = ", currentState);
0

There are 0 best solutions below