Sunday, 25 August 2013

MPMoviewPlayer disapper itself after clicking on view

MPMoviewPlayer disapper itself after clicking on view

I'm trying to make a simple viewer by using UIScrollView and
MPMoviewPlayerController, here is the code.
for(int i=0;i<videocount;i++)
{
MPMoviePlayerController* player=[[MPMoviePlayerController alloc]
initWithContentURL:fileUrl];
player.movieSourceType=MPMovieSourceTypeStreaming;
player.view.frame=CGRectMake(i*self.view.frame.size.width, 0,
self.view.frame.size.width,
self.containerScroll.frame.size.height);
[self.containerScroll addSubview:player.view];
player.fullscreen=NO;
[player setShouldAutoplay:NO];
player.controlStyle=MPMovieControlStyleEmbedded;
}
all of this things i'm doing inside the ViewController and the after
presenting viewcontroller modally, the problem is that when video reaches
the end it automatically disapperas from the screen and instead i see the
black screen, and the sam situation when i click on thevideo frame.

No comments:

Post a Comment