Instance Property

playbackState

The current playback state of the music player.

Declaration

@property(nonatomic, readonly) MPMusicPlaybackState playbackState;

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.

See Also

Managing Playback Mode and State

nowPlayingItem

The currently-playing media item, or the media item, within a queue, that you have designated to begin playback with.

indexOfNowPlayingItem

The index of the now playing item in the current playback queue.

repeatMode

The current repeat mode of the music player.

shuffleMode

The current shuffle mode of the music player.

MPMusicPlaybackState

The music player playback state modes.

MPMusicRepeatMode

The repeat modes for the media player.

MPMusicShuffleMode

The shuffle modes for the media player.

volume

The audio playback volume for the music player, in the range from 0.0 (silent) through 1.0 (maximum volume).

Deprecated