setQueue(with:)
Sets a music player’s playback queue based on a media query.
Declaration
func setQueue(with query: MPMediaQuery)Parameters
- query:
A media query that specifies the collection of media items that you want as the playback queue. See Mpmediaquery for a description of query types and how to create them.
Discussion
To begin playback after establishing a playback queue, call prepareToPlay().