R – iPhone media player framework : play multiple movie files seamlessly

iphoneiphone-sdk-3.0media-player

I am using the media player framework's MPMoviePlayerController to play local (on device) m4v files. Depending on user's selection, I want to be able to play multiple movies one after the other seamlessly.

To do this, I queue up the movies in an array and in my observer method that is called on the MPMoviePlayerPlaybackDidFinishNotification event which is triggered after one movie finishes, I play the next movie in the queue.

However, this is far from seamless. After each movie finishes, the iphone view transitions back to the base view from which the movieplayer was called and then picks up the movie called in the observer method (moviePlayBackDidFinish).

Is there a way to make the movies play one after the other seamlessly without breaking to transition back to the base view?

Just to be very clear, all the movies are local and bundled with the app as resources, not being streamed from anywhere.

Best Answer

You can use AVMutableComposition. It combines media data from multiple file-based sources in a custom temporal arrangement, in order to present or process media data from multiple sources together.

Related Topic