Question

Can any one suggest me how to play the music using MPMusicPlayerController in my application.

Anyone's help will be very much appreciated.

Thank you, Monish.

Was it helpful?

Solution

Create a MPMediaPickerController so you can choose some music from the iPod, then in the mediaPicker:didPickMediaItems: call back you do this:

MPMusicPlayerController* playa;
playa = [MPMusicPlayerController applicationMusicPlayer];
[playa setQueueWithItemCollection:mediaItemCollection];
[playa play];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top