Right now now I'm thinking about getting a playlist through MPMediaQuery and then add the items inside my MPMediaPlaylist to the MPMusicPlayerController using setQueueWithItemCollection. Is there a way to pass the MPMediaPlaylist directly to the player?
views:
282answers:
1
+1
A:
Can you show your code, or explain a little further?
It should be possible to configure the player either by passing the playlist directly to -[MPMusicPlayerController setQueueWithItemCollection:] (MPMediaPlaylist is a subclass of MPMediaItemCollection), or, if you're creating your playlist from a media query, to use -[MPMusicPlayerController setQueueWithQuery:]. Is that not direct enough?
Sixten Otto
2009-12-30 14:29:21
So I guess `setQueueWithItemCollection` is the one to use (missed the subclass thing in the docs). I guess setQueueWithQuery would be more complicated to use (and pointless) as I would need to build a MPMediaQuery to retrieve the songs from a given playlist. Thanks for the confirmation.
ruibm
2009-12-30 14:34:57