Contents

nowPlayingItem

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

Declaration

@NSCopying var nowPlayingItem: MPMediaItem? { get set }

Discussion

To specify that playback should begin at a particular media item in the playback queue, set this property to that item while the music player is in a stopped or paused state.

If no media item is playing or designated to play, this property’s value is nil.

If you use the system music player and the user plays an item from another library using Home Sharing, the value of this property is nil.

See Also

Managing playback mode and state