Satyam
Satyam

Reputation: 15894

iPhone - MPMusicPlayerController - Selecting audio from the queue and play it

I'm using MPMusicPlayerController in my application. I'm setting a queue using method "setQueueWithItemCollection". I'm able to play the songs, move to prev/next songs etc. But how can I make MPMusicPlayerController play some 5th song from the queue?

Upvotes: 3

Views: 1032

Answers (2)

Tom Dev
Tom Dev

Reputation: 1114

when you set the queue, save the queue somewhere else that you can access. if you want to play the fifth song, use MPMusicPlayerController.nowPlayingItem= [[queue items] objectAtIndex:4] and it will play the fifth song. you don't have to skip 5 times.

Upvotes: 2

Satyam
Satyam

Reputation: 15894

you have to maintain another list of queue in your application. Then everytime, when you to jump to another song, get players current item, compare it from your array iterating through it and at the same time use skip to prev or next song from music player. no other solution found.

Upvotes: 0

Related Questions