Reputation: 15894
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
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
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