The Ï„ Player API
getPlayerState()
playerState, isPlaying, isPaused, isStopped. getPlayerState()
This four verbs is used when the app wants to get the current Audio State of the player.
playerState is an attribut which can have the following values :
isStopped /// Player is stopped
isPlaying /// Player is playing
isPaused /// Player is paused
Flutter Sound shows in the playerState attribut the last known state. When the Audio State of the background OS engine changes, the playerState parameter is not updated exactly at the same time. If you want the exact background OS engine state you must use PlayerState theState = await myPlayer.getPlayerState(). Acutually getPlayerState() is only implemented on iOS.
Example:
</div>