Skip to main content
Version: 4.0

State

All State types are made available through the named export State:

import { State } from 'react-native-track-player';
NameDescription
NoneState indicating that no media is currently loaded
ReadyState indicates that the player is paused, but ready to start playing
PlayingState indicating that the player is currently playing
PausedState indicating that the player is currently paused
StoppedState indicating that the player is currently stopped
EndedState indicates playback stopped due to the end of the queue being reached
BufferingState indicating that the player is currently buffering (no matter whether playback is paused or not)
LoadingState indicating the initial loading phase of a track
ErrorState indicating that the player experienced a playback error causing the audio to stop playing (or not start playing). When in State.Error, calling play() reloads the current track and seeks to its last known time.
Connecting⚠️ Deprecated. Please use State.Loading instead. State indicating that the player is currently buffering (in "pause" state)