playbackState
The current playback state of the music player.
Declaration
var playbackState: MPMusicPlaybackState { get }Discussion
If you configure a music player as a system music player, the playback state matches the playback state of the built-in Music app. This is true whether the Music app is using the device Music library or a home shared library. Note, however, that when the Music app is using a home shared library, the music player’s nowPlayingItem property is nil.
For the available playback states, see MPMusicPlaybackState.