views:

455

answers:

2

I am not an iPhone developer (yet). So please excuse me if this issue is very basic question.

From what I can gather from the development documentation, it is only possible to 'play' one video file at a time.

The requirement I have is to switch from 1 video to another seamlessly or switch to a 2nd instance of the first video and keep 'looping'.

Is it possible to load/buffer a 2nd video so that videos can be seamlessly played after each other to give the effect that there is a constant video feed? Or, 'playing' 2 videos but only having one on screen at any one time?

A: 

As of IPhone SDK 3.1.3 the MPMoviePlayer cannot do this. Keep an eye out for future SDK updates.

Warren Kaye
A: 

Unfortunately (and much to my disgust) you cannot make a seamless loop. There is however a MPMoviePlayerPlaybackDidFinishNotification notification/event that you can observe/listen to which essentially gives you an event when the movie has finished playing. You can use this to play the next video or repeat the one you just played.

The down side is that the MPMoviePlayerController fades the previous movie out (to the background color) when it has finished playing which stops us from looping continuously. If your video does not have sound, I would suggest extracting the frames and playing them back with a UIImageView, if it does have audio, then (like me) you are kind of stuck!

Good luck.

donkeykong
Do you reckon you could fade an image up over the control inbetween the video seams?
Jon Winstanley
It may be possible to use the first frame of the movie as a UIImageView in the view that the Movie Fades to.
donkeykong