2

How can I start next song immediately with AVPlayer? I have collections of song selected from iPod Library in MPMediaItemCollection.

Now how can i use AVPlayer for lists of songs to be played one by one??

DShah
  • 9,768
  • 11
  • 71
  • 127

1 Answers1

6

For answer to your first question, You can use Notification for the same as

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(songFinished:)
                                             name:AVPlayerItemDidPlayToEndTimeNotification
                                           object:[yourAVPlayer currentItem]];

-(void)songFinished:(NSNotification *)notification
{
     //Do your next stuff here;
}
Marcelo Alves
  • 1,856
  • 11
  • 12
Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99