views:

37

answers:

1

Hi

I have a lengthy video in server,if i try to play that video in iphone using the code below

NSURL *url = [NSURL URLWithString:@"http://somelengthyvideo.mp4"];

player = [[MPMoviePlayerController alloc]initWithContentURL:url];

[player play];

i am facing the following problem.

the buffering time is very slow, compare to the video playing time, if the video trying to play while there is no buffered data, then the video is automatically paused, and its not playing automatically even after fully buffered,

how to enable auto play the video, in these situation,

Thanks in advance,

A: 

set MPMovieSourceType type to MPMovieSourceTypeStreaming and set shouldAutoplay property to yes.

jeeva