Enumeration

MPMusicPlaybackState

The music player playback state modes.

Declaration

enum MPMusicPlaybackState : Int

Overview

You determine a music player’s state by checking the playbackState property. Depending on the property’s value, you can update your application’s user interface or take other appropriate action.

Topics

Constants

case stopped

The music player is stopped.

case playing

The music player is playing.

case paused

The music player is paused.

case interrupted

The music player has been interrupted, such as by an incoming phone call.

case seekingForward

The music player is seeking forward.

case seekingBackward

The music player is seeking backward.

See Also

Managing Playback Mode and State

var nowPlayingItem: MPMediaItem?

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

var indexOfNowPlayingItem: Int

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

var playbackState: MPMusicPlaybackState

The current playback state of the music player.

var repeatMode: MPMusicRepeatMode

The current repeat mode of the music player.

var shuffleMode: MPMusicShuffleMode

The current shuffle mode of the music player.

enum MPMusicRepeatMode

The repeat modes for the media player.

enum MPMusicShuffleMode

The shuffle modes for the media player.