Take the 2-minute tour ×

I have made a music app using avtouchController & I want to play my next song one after the other using autoplay can u please give me the step to autoplay a song.

share|improve this question
What is AVTouchController? I don't see a reference to it in the iOS SDK. –  Kris Markel Oct 12 '10 at 6:13

3 Answers 3

It's hard to tell from your question, but it sounds like you want to use AVQueuePlayer.

share|improve this answer

You should go to settings and set the play mode as sequential play mode.

share|improve this answer

If you're using AVFoundation, you can just add a listener to your player, and make the end playback method to fetch the next track. You add the listener like so:

    [[NSNotificationCenter defaultCenter] addObserver:self
                                           object:[player currentItem]];

And then you create your method, something like this:

    -(void)playerItemDidReachEnd:(NSNotification *)notification {
        AVPlayerItem *p = [notification object];
        //Fetch your next track from your plist, array, database or whatever
share|improve this answer

Your Answer


